changeset 2:d4803c1e5e19 draft

planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f127be2141cf22e269c85282d226eb16fe14a9c1
author galaxyp
date Fri, 15 Feb 2019 10:21:09 -0500
parents ae9ffc7ba261
children 16556ca0196b
files macros.xml quality_report.xml test-data/112_auto_combined.RData test-data/112_auto_combined.ibd test-data/112_auto_combined.imzml test-data/112_auto_combined.imzml.txt test-data/112_auto_combined_QC.pdf test-data/123_annotation.ibd test-data/123_annotation.imzml test-data/123_auto_combined.imzml.txt test-data/123_combined.RData test-data/123_combined_QC.pdf test-data/123_combined_auto.ibd test-data/123_combined_auto.imzml test-data/123_combined_auto.imzml.txt test-data/123_combined_auto.pdf test-data/123_combined_auto.tabular test-data/12_combined.RData test-data/12_combined_QC.pdf test-data/2123_auto_combined.RData test-data/2123_auto_combined_QC.pdf test-data/Plot_empty_spectra.pdf test-data/QC_analyze75.pdf test-data/QC_empty_spectra.pdf test-data/QC_imzml.pdf test-data/QC_rdata.pdf test-data/analyze75_filtered2.pdf test-data/analyze_filtered.RData test-data/analyze_filtered.pdf test-data/analyze_filteredoutside.RData test-data/analyze_originaloutput.RData test-data/analyze_originaloutput2.RData test-data/centroids_rdata.pdf test-data/cluster_skm.RData test-data/features_test2.tabular test-data/features_test4.tabular test-data/features_test6.tabular test-data/features_test7.tabular test-data/imzml_filtered.RData test-data/imzml_filtered.pdf test-data/imzml_filtered3.RData test-data/imzml_filtered3.pdf test-data/imzml_filtered4.RData test-data/imzml_filtered4.pdf test-data/imzml_filtered5.RData test-data/imzml_filtered5.pdf test-data/kmeans_analyze.pdf test-data/loadings_pca.tabular test-data/out3.ibd test-data/out3.imzml test-data/out3.imzml.txt test-data/out4.ibd test-data/out4.imzml test-data/out4.imzml.txt test-data/out5.ibd test-data/out5.imzml test-data/out5.imzml.txt test-data/out6.ibd test-data/out6.imzml test-data/out6.imzml.txt test-data/out7.ibd test-data/out7.imzml test-data/out7.imzml.txt test-data/pca_imzml.pdf test-data/pixel_out2.tabular test-data/pixel_out3.tabular test-data/preprocessed.rdata test-data/preprocessing_results1.RData test-data/preprocessing_results1.ibd test-data/preprocessing_results1.imzml test-data/preprocessing_results1.imzml.txt test-data/preprocessing_results1.pdf test-data/preprocessing_results1.txt test-data/preprocessing_results2.RData test-data/preprocessing_results2.ibd test-data/preprocessing_results2.imzml test-data/preprocessing_results2.imzml.txt test-data/preprocessing_results2.pdf test-data/preprocessing_results2.txt test-data/preprocessing_results3.RData test-data/preprocessing_results3.ibd test-data/preprocessing_results3.imzml test-data/preprocessing_results3.imzml.txt test-data/preprocessing_results3.pdf test-data/preprocessing_results4.RData test-data/preprocessing_results4.ibd test-data/preprocessing_results4.imzml test-data/preprocessing_results4.imzml.txt test-data/preprocessing_results4.pdf test-data/preprocessing_results4.txt test-data/preprocessing_results5.RData test-data/preprocessing_results5.pdf test-data/preprocessing_results5.txt test-data/rdata_notfiltered.RData test-data/rdata_notfiltered.pdf test-data/scores_pca.tabular test-data/test1.pdf test-data/test2.pdf test-data/test2.rdata test-data/test3.pdf test-data/test4.pdf test-data/test4.rdata test-data/test5.pdf test-data/test6.pdf test-data/test6.rdata test-data/test7.pdf test-data/test7.rdata
diffstat 107 files changed, 4512 insertions(+), 2225 deletions(-) [+]
line wrap: on
line diff
--- a/macros.xml	Thu Oct 25 07:28:42 2018 -0400
+++ b/macros.xml	Fri Feb 15 10:21:09 2019 -0500
@@ -69,25 +69,92 @@
         ## Range y coordinates
         minimumy = min(coord(msidata)[,2])
         maximumy = max(coord(msidata)[,2])
+
+
+        properties = c("Number of m/z features",
+                       "Range of m/z values",
+                       "Number of pixels", 
+                       "Range of x coordinates", 
+                       "Range of y coordinates")
+
+        values = c(paste0(maxfeatures), 
+                   paste0(minmz, " - ", maxmz), 
+                   paste0(pixelcount), 
+                   paste0(minimumx, " - ", maximumx),
+                   paste0(minimumy, " - ", maximumy))
+
+        property_df = data.frame(properties, values)
+    ]]></token>
+
+    <token name="@READING_MSIDATA_INRAM@"><![CDATA[
+        ## importing MSI data files
+
+        ## function to read RData files independent of filename
+        loadRData <- function(fileName){
+        load(fileName)
+        get(ls()[ls() != "fileName"])
+        }
+
+        #if $infile.ext == 'imzml'
+            #if str($processed_cond.processed_file) == "processed":
+                msidata <- readImzML('infile', mass.accuracy=$processed_cond.accuracy, units.accuracy = "$processed_cond.units")
+                centroided(msidata) = $centroids
+            #else
+                msidata <- readImzML('infile')
+                centroided(msidata) = $centroids
+            #end if
+        #elif $infile.ext == 'analyze75'
+            msidata = readAnalyze('infile')
+            centroided(msidata) = $centroids
+        #else
+            msidata = loadRData('infile.RData')
+        #end if
+
+    ]]></token>
+
+    <token name="@DATA_PROPERTIES_INRAM@"><![CDATA[
+########################### QC numbers ########################
+## including intensity calculations which need data in RAM
+        ## Number of features (mz)
+        maxfeatures = length(features(msidata))
+        ## Range mz
+        minmz = round(min(mz(msidata)), digits=2)
+        maxmz = round(max(mz(msidata)), digits=2)
+        ## Number of spectra (pixels)
+        pixelcount = length(pixels(msidata))
+        ## Range x coordinates
+        minimumx = min(coord(msidata)[,1])
+        maximumx = max(coord(msidata)[,1])
+        ## Range y coordinates
+        minimumy = min(coord(msidata)[,2])
+        maximumy = max(coord(msidata)[,2])
         ## Range of intensities
         minint = round(min(spectra(msidata)[], na.rm=TRUE), digits=2)
         maxint = round(max(spectra(msidata)[], na.rm=TRUE), digits=2)
         ## Number of intensities > 0, for if conditions
         npeaks= sum(spectra(msidata)[]>0, na.rm=TRUE)
+        ## Number of NA in spectra matrix
+        NAcount = sum(is.na(spectra(msidata)[]))
+        ## Number of NA in spectra matrix
+        infcount = sum(is.infinite(spectra(msidata)[]))
 
         properties = c("Number of m/z features",
                        "Range of m/z values",
                        "Number of pixels", 
                        "Range of x coordinates", 
                        "Range of y coordinates",
-                       "Range of intensities")
+                       "Range of intensities", 
+                       "Number of NA intensities",
+                       "Number of Inf intensities")
 
         values = c(paste0(maxfeatures), 
                    paste0(minmz, " - ", maxmz), 
                    paste0(pixelcount), 
                    paste0(minimumx, " - ", maximumx),  
                    paste0(minimumy, " - ", maximumy), 
-                   paste0(minint, " - ", maxint))
+                   paste0(minint, " - ", maxint), 
+                   paste0(NAcount), 
+                   paste0(infcount))
 
         property_df = data.frame(properties, values)
     ]]></token>
@@ -144,9 +211,9 @@
     <token name="@SPECTRA_TABULAR_INPUT_DESCRIPTION@"><![CDATA[
         - Optional file with pixel coordinates and annotation: 
 
-            - Tabular file: One column with x values, one column wiht y values and one column with annotations
+            - Tabular file: One column with x values, one column with y values and one column with annotations
             - The file is allowed to have any column names as header (in this case set "Tabular file contains a header line" to yes)
-            - Pixel with coordinates outside the coordinates of the input file are ignored 
+            - Pixel with coordinates outside the coordinates of the input file are ignored
 
                 ::
 
@@ -161,9 +228,9 @@
 
     <xml name="reading_msidata">
         <param name="infile" type="data" format="imzml,rdata,analyze75"
-               label="Input file as imzML, Analyze7.5 or Cardinal MSImageSet saved as RData"
-                help="Upload composite datatype imzML (ibd+imzML) or analyze75 (hdr+img+t2m) or regular upload .RData (Cardinal MSImageSet)"/>
-        <param name="centroids" type="boolean" label="Is the input data centroided (picked)" help="Choose Yes if peak detection has already been done." truevalue="TRUE" falsevalue="FALSE"/>
+               label="MSI data"
+                help="Input file as imzML (composite upload), or Cardinal MSImageSet saved as RData (regular upload)"/>
+        <param name="centroids" type="boolean" label="Centroided input" help="Choose Yes if peak detection has already been done." truevalue="TRUE" falsevalue="FALSE"/>
         <conditional name="processed_cond">
             <param name="processed_file" type="select" label="Processed imzML file" help="Choose no if your input is an Analyze7.5 or continuous imzML file">
                 <option value="no_processed" selected="True">no</option>
--- a/quality_report.xml	Thu Oct 25 07:28:42 2018 -0400
+++ b/quality_report.xml	Fri Feb 15 10:21:09 2019 -0500
@@ -1,4 +1,4 @@
-<tool id="cardinal_quality_report" name="MSI Qualitycontrol" version="@VERSION@.1">
+<tool id="cardinal_quality_report" name="MSI Qualitycontrol" version="@VERSION@.2">
     <description>
         mass spectrometry imaging QC
     </description>
@@ -34,15 +34,15 @@
 library(pheatmap)
 
 
-@READING_MSIDATA@
+@READING_MSIDATA_INRAM@
+
+## create full matrix to make processed imzML files compatible with segmentation and other steps
+iData(msidata) <- iData(msidata)[]
 
 ## remove duplicated coordinates
 print(paste0(sum(duplicated(coord(msidata))), " duplicated coordinates were removed"))
 msidata <- msidata[,!duplicated(coord(msidata))]
 
-## create full matrix to make processed imzML files compatible with segmentation and other steps
-iData(msidata) <- iData(msidata)[]
-
 ## optional annotation from tabular file to obtain pixel groups (otherwise all pixels are considered to be one sample)
 
 #if str($tabular_annotation.load_annotation) == 'yes_annotation':
@@ -64,12 +64,12 @@
 #end if
 
 ###################### calculation of data properties ################################
-@DATA_PROPERTIES@
+@DATA_PROPERTIES_INRAM@
 
 ## Median intensities
 medint = round(median(spectra(msidata)[], na.rm=TRUE), digits=2)
 ## Spectra multiplied with m/z (potential number of peaks)
-numpeaks = ncol(spectra(msidata)[])*nrow(spectra(msidata)[])
+numpeaks = ncol(msidata)*nrow(msidata)
 ## Percentage of intensities > 0
 percpeaks = round(npeaks/numpeaks*100, digits=2)
 ## Number of empty TICs
@@ -81,17 +81,16 @@
 ## Median and sd # peaks per spectrum
 medpeaks = round(median(colSums(spectra(msidata)[]>0, na.rm=TRUE), na.rm=TRUE), digits=0)
 sdpeaks = round(sd(colSums(spectra(msidata)[]>0, na.rm=TRUE), na.rm=TRUE), digits=0)
-print(cor(TICs,colSums(spectra(msidata)[]>0), method="pearson"))
 ## Processing informations
 centroidedinfo = centroided(msidata)
 
 ############## Read and filter tabular file with m/z ###########################
 
-### reading calibrant file: 
+### reading m/z input (calibrant) file:
 
 #if $calibrant_file:
 
-    calibrant_list = read.delim("$calibrant_file", header = $calibrant_header, na.strings=c("","NA"), stringsAsFactors = FALSE)
+    calibrant_list = read.delim("$calibrant_file", header = $calibrant_header, na.strings=c(" ","","NA"), stringsAsFactors = FALSE)
     calibrant_list = calibrant_list[,c($mz_column, $name_column)]
 
     ### calculate how many input calibrant m/z are valid: 
@@ -138,7 +137,7 @@
                "Median TIC ± sd", 
                "Median # peaks per spectrum ± sd",
                "Centroided", 
-               paste0("calibrants (#valid/#input) in \n", "$calibrant_file.display_name"))
+               paste0("input m/z (#valid/#input) in \n", "$calibrant_file.display_name"))
 
 values2 = c(paste0(medint),
            paste0(percpeaks, " %"), 
@@ -161,7 +160,9 @@
 print("x-y images")
 
 ## only do plots for file with intensity peaks
+
 if (npeaks > 0){
+
     ## function for density plots
     plot_colorByDensity = function(x1,x2,
                                    ylim=c(min(x2),max(x2)),
@@ -204,8 +205,11 @@
         colnames(pixel_name_df) = c("pixel_number", "pixel_name")
         last_pixel = aggregate(pixel_number~pixel_name, data = pixel_name_df, max)
         pixel_vector = last_pixel[,2]
-        abline_vector = pixel_vector[1:number_combined-1]
-        print(abline_vector)
+        abline_vector = pixel_vector
+
+        ## remove position_df to clean up RAM space
+            rm(position_df)
+            gc()
     }
 
     ################### 1) Pixel order image ###################################
@@ -220,7 +224,11 @@
      theme(plot.title = element_text(hjust = 0.5))+
      theme(text=element_text(family="ArialMT", face="bold", size=12))+
      scale_fill_gradientn(colours = c("blue", "purple" , "red","orange"), 
-       space = "Lab", na.value = "black", name = "Pixel\nnumber"))
+     space = "Lab", na.value = "black", name = "Pixel\nnumber"))
+
+    ## remove pixelxyarray to clean up RAM space
+        rm(pixelxyarray)
+        gc()
 
     ################ 2) Number of calibrants per spectrum ######################
 
@@ -260,7 +268,7 @@
         ## for each pixel count TRUE (each calibrant m/z range with intensity > 0 is TRUE)
         countvector= as.factor(colSums(pixelmatrix, na.rm=TRUE))
         countdf= cbind(coord(msidata)[,1:2], countvector) ## add pixel coordinates to counts
-        mycolours = c("black","grey", "darkblue", "blue", "green" , "red", "yellow", "magenta", "olivedrab1", "lightseagreen")
+        mycolours = brewer.pal(9, "Set1")
 
         print(ggplot(countdf, aes(x=x, y=y, fill=countvector))+
           geom_tile() + coord_fixed() +
@@ -271,6 +279,10 @@
           scale_fill_manual(values = mycolours[1:length(countvector)], 
                                 na.value = "black", name = "# calibrants"))
 
+        ## remove countdf to clean up RAM space
+            rm(countdf)
+            gc()
+
     }else{print("2) The inputcalibrant m/z were not provided or outside the m/z range")}
 
     ########################## 3) fold change image ###########################
@@ -279,27 +291,19 @@
         #for $foldchanges in $calibrantratio:
             mass1 = $foldchanges.mass1
             mass2 = $foldchanges.mass2
-            distance = $foldchanges.distance
+            distance1 = $foldchanges.distance/1000000 * mass1
+            distance2 = $foldchanges.distance/1000000 * mass2
 
             ### if user did not write a label use input m/z as label
             #if not str($foldchanges.filenameratioplot).strip():
-                #set $label = "Fold change %s Da / %s Da" % ($foldchanges.mass1, $foldchanges.mass2)
+                #set $label = "log2 fold change %s Da / %s Da" % ($foldchanges.mass1, $foldchanges.mass2)
             #else:
                 #set $label = $foldchanges.filenameratioplot
             #end if
 
             ### filter msidata for given m/z range (for both input m/z)
-            filtered_data1 = msidata[mz(msidata) >= mass1-distance & mz(msidata) <= mass1+distance,]
-            filtered_data2 = msidata[mz(msidata) >= mass2-distance & mz(msidata) <= mass2+distance,]
-
-            ### find m/z in the two given ranges with the highest mean intensity
-            ### this two m/z will be used to calculate the fold change (red line in plot)
-            maxmassrow1 = rowMeans(spectra(filtered_data1), na.rm=TRUE)
-            maxmass1 = mz(filtered_data1)[which.max(maxmassrow1)]
-            maxmassrow2 = rowMeans(spectra(filtered_data2), na.rm=TRUE)
-            maxmass2 = mz(filtered_data2)[which.max(maxmassrow2)]
-
-            ### plot legend: chosen value in blue, distance in blue, max m/z in red
+            filtered_data1 = msidata[mz(msidata) >= mass1-distance1 & mz(msidata) <= mass1+distance1,]
+            filtered_data2 = msidata[mz(msidata) >= mass2-distance2 & mz(msidata) <= mass2+distance2,]
             ### m/z range for each plot (fixed range of 5 Da)
             ### xlim does not work because it does not adjust for the max. intensities within the range
             mzdown1 = features(msidata, mz = mass1-2)
@@ -310,36 +314,36 @@
             ### plot for first m/z 
             par(mfrow=c(2,1), oma=c(0,0,2,0))
             plot(msidata[mzdown1:mzup1,], pixel = 1:pixelcount, main=paste0("Average spectrum ", mass1, " Da"))
-            abline(v=c(mass1-distance, mass1, mass1+distance), col="blue",lty=c(3,6,3))
-            abline(v=maxmass1, col="red", lty=5)
+            abline(v=c(mass1-distance1, mass1, mass1+distance1), col="blue",lty=c(3,6,3))
 
             ### plot for second m/z 
             plot(msidata[mzdown2:mzup2,], pixel = 1:pixelcount, main= paste0("Average spectrum ", mass2, " Da"))
-            abline(v=c(mass2-distance, mass2, mass2+distance), col="blue", lty=c(3,6,3))
-            abline(v=maxmass2, col="red", lty=5)
+            abline(v=c(mass2-distance2, mass2, mass2+distance2), col="blue", lty=c(3,6,3))
             title("Control of fold change plot", outer=TRUE)
 
             ### filter spectra for max m/z to have two vectors, which can be divided
             ### plot spatial distribution of fold change
-            ### only possible when there are intensities > 0 in both given m/z ranges
 
-            if (length(maxmass1)>0&length(maxmass2)>0){
-                mass1vector = spectra(msidata)[features(msidata, mz = maxmass1),]
-                mass2vector = spectra(msidata)[features(msidata, mz = maxmass2),]
-                foldchange= log2(mass1vector/mass2vector)
-                fcmatrix = cbind(foldchange, coord(msidata)[,1:2])
+            ## calculate mean intensity for each m/z over the ppm range; then calculate log2 foldchange
+            mass1vector = colMeans(spectra(filtered_data1), na.rm =TRUE)
+            mass2vector = colMeans(spectra(filtered_data2), na.rm = TRUE)
+            foldchange= log2(mass1vector/mass2vector)
+            fcmatrix = cbind(foldchange, coord(msidata)[,1:2])
 
-                print(ggplot(fcmatrix, aes(x=x, y=y, fill=foldchange), colour=colo)+
-                 geom_tile() + coord_fixed()+
-                 ggtitle("$label")+
-                 theme_bw()+
-                 theme(plot.title = element_text(hjust = 0.5))+
-                 theme(text=element_text(family="ArialMT", face="bold", size=12))+
-                 scale_fill_gradientn(colours = c("blue", "purple" , "red","orange")
-                                        ,space = "Lab", na.value = "black", name ="FC"))
-            }else{
-                plot(0,type='n',axes=FALSE,ann=FALSE)
-                title(main=paste("At least one m/z range did not contain any intensity > 0,\n therefore no foldchange plot could be drawn"))}
+            print(ggplot(fcmatrix, aes(x=x, y=y, fill=foldchange))+
+             geom_tile() + coord_fixed()+
+             ggtitle("$label")+
+             theme_bw()+
+             theme(plot.title = element_text(hjust = 0.5))+
+             theme(text=element_text(family="ArialMT", face="bold", size=12))+
+             scale_fill_gradientn(colours = c("blue", "purple" , "red","orange")
+                                    ,space = "Lab", na.value = "black", name ="FC"))
+
+            ## remove FC files to clean up RAM space
+                rm(fcmatrix)
+                rm(filtered_data1)
+                rm(filtered_data2)
+                gc()
 
         #end for
     #end if
@@ -353,7 +357,7 @@
 
             image(msidata, mz=inputcalibrants[,1][mass], plusminus=plusminusvalues[mass], 
             main= paste0(inputcalibrants[,2][mass], ": ", round(inputcalibrants[,1][mass], digits = 2)," (±",$plusminus_ppm, " ppm)"),
-            contrast.enhance = "histogram", ylim= c(maximumy+0.2*maximumy,minimumy-0.2*minimumy))
+            contrast.enhance = "histogram", ylim= c(maximumy+0.2*maximumy,minimumy-1))
         }
     } else {print("4) The input peptide and calibrant m/z were not provided or outside the m/z range")}
 
@@ -372,6 +376,10 @@
      scale_fill_gradientn(colours = c("blue", "purple" , "red","orange") 
                             ,space = "Lab", na.value = "black", name = "# peaks"))
 
+    ## remove peakscoordarray to clean up RAM space
+        rm(peakscoordarray)
+        gc()
+
 
     ############################### 6) TIC image ###############################
 
@@ -386,24 +394,59 @@
      scale_fill_gradientn(colours = c("blue", "purple" , "red","orange") 
                             ,space = "Lab", na.value = "black", name = "TIC"))
 
+    ## remove TICcoordarray to clean up RAM space
+        rm(TICcoordarray)
+        gc()
+
     ############################### 6b) median int image ###############################
 
     median_int = apply(spectra(msidata)[],2,median) 
     median_coordarray=cbind(coord(msidata)[,1:2], median_int)
+
     print(ggplot(median_coordarray, aes(x=x, y=y, fill=median_int))+
      geom_tile() + coord_fixed() +
-     ggtitle("Median intensity per pixel")+
+     ggtitle("Median intensity per spectrum")+
      theme_bw() +
      theme(plot.title = element_text(hjust = 0.5))+
      theme(text=element_text(family="ArialMT", face="bold", size=12))+
      scale_fill_gradientn(colours = c("blue", "purple" , "red","orange") 
                             ,space = "Lab", na.value = "black", name = "median\nintensity"))
 
+    ## remove median_coordarray to clean up RAM space
+        rm(median_coordarray)
+        gc()
 
+    ############################### 6c) max int image ###############################
+
+    max_int = apply(spectra(msidata)[],2,max) 
+    max_coordarray=cbind(coord(msidata)[,1:2], max_int)
+
+    print(ggplot(max_coordarray, aes(x=x, y=y, fill=max_int))+
+     geom_tile() + coord_fixed() +
+     ggtitle("Maximum intensity per spectrum")+
+     theme_bw() +
+     theme(plot.title = element_text(hjust = 0.5))+
+     theme(text=element_text(family="ArialMT", face="bold", size=12))+
+     scale_fill_gradientn(colours = c("blue", "purple" , "red","orange") 
+                            ,space = "Lab", na.value = "black", name = "max\nintensity"))
+
+    ## remove median_coordarray to clean up RAM space
+        rm(max_coordarray)
+        gc()
 
     ############################### 7) Most abundant m/z image #################
 
-    highestmz = apply(spectra(msidata)[],2,which.max) 
+    ## for each spectrum find the row (m/z) with the highest intensity
+    highestmz = apply(spectra(msidata)[],2,which.max)
+    ## in case for some spectra max returns integer(0), highestmz is a list and integer(0) have to be replaced with NA and unlisted
+    if (class(highestmz) == "list"){
+        ##find zero-length values
+        zero_entry <- !(sapply(highestmz, length))
+        ### replace these values with NA
+        highestmz[zero_entry] <- NA
+        ### unlist list to get a vector
+        highestmz = unlist(highestmz)}
+
     highestmz_matrix = cbind(coord(msidata)[,1:2],mz(msidata)[highestmz])
     colnames(highestmz_matrix)[3] = "highestmzinDa"
 
@@ -416,16 +459,29 @@
       limits=c(min(highestmz_matrix\$highestmzinDa), max(highestmz_matrix\$highestmzinDa)))+
     theme(text=element_text(family="ArialMT", face="bold", size=12)))
 
+    ## remove highestmz_matrix to clean up RAM space
+        rm(highestmz_matrix)
+        gc()
+
 
     ########################## 8) optional pca image for two components #################
 
     #if $do_pca:
 
         set.seed(1)
-        pca = PCA(msidata, ncomp=2) 
+        pca = PCA(msidata, ncomp=2)
+
+        ## plot overview image and plot and PC1 and 2 images
         par(mfrow = c(2,1))
         plot(pca, col=c("black", "darkgrey"), main="PCA for two components")
-        image(pca, col=c("black", "white"), strip=FALSE, ylim= c(maximumy+0.2*maximumy,minimumy-0.2*minimumy))
+        image(pca, col=c("black", "white"), strip=FALSE, ylim= c(maximumy+0.2*maximumy,minimumy-1))
+
+        for (PCs in 1:2){
+            print(image(pca, column = c(paste0("PC",PCs)) , superpose = FALSE, col.regions = risk.colors(100), ylim=c(maximumy+2, minimumy-2)))}
+
+    ## remove pca to clean up RAM space
+        rm(pca)
+        gc()
 
     #end if
 
@@ -473,22 +529,28 @@
 
     ## 10a)density scatterplot
     par(mfrow = c(2,1), mar=c(5,6,4,2))
+    
+    ## colorDensityplot does not work after TIC normalization, therefore make normal plot
+    if (min(TICs) == max(TICs)){
+        plot(pixels(msidata), TICs, ylab = "", xlab = "", pch=20, main="TIC per spectrum", col="#FF3100")
+    }else{
+        plot_colorByDensity(pixels(msidata), TICs,  ylab = "", xlab = "", main="TIC per spectrum")
+    }
 
-    plot_colorByDensity(pixels(msidata), TICs,  ylab = "", xlab = "", main="TIC per spectrum")
     title(xlab="Spectra index", line=3)
     title(ylab = "Total ion chromatogram intensity", line=4)
     if (!is.null(levels(msidata\$annotation))){
         abline(v=abline_vector, lty = 3)}
 
     ## 10b) histogram
-    hist(log(TICs), main="", las=1, xlab = "log(TIC per spectrum)", ylab="")
+    hist((TICs), main="", las=1, xlab = "TIC per spectrum", ylab="")
     title(main= "TIC per spectrum", line=2)
     title(ylab="Frequency = # spectra", line=4)
-    abline(v=median(log(TICs[TICs>0])), col="blue")    
+    abline(v=median(TICs[TICs>0]), col="blue")
 
     ## 10c) additional histogram to show annotation contributions
     if (!is.null(levels(msidata\$annotation))){
-        df_10 = data.frame(log(TICs), msidata\$annotation)
+        df_10 = data.frame((TICs), msidata\$annotation)
         colnames(df_10) = c("TICs", "annotation")
 
         hist_10 = ggplot(df_10, aes(x=TICs, fill=annotation)) +
@@ -497,9 +559,9 @@
         theme(plot.title = element_text(hjust = 0.5))+
         theme(legend.position="bottom",legend.direction="vertical")+
         theme(legend.key.size = unit(0.2, "line"), legend.text = element_text(size = 8))+
-        labs(title="TIC per spectrum and annotation group", x="log(TIC per spectrum)", y = "Frequency = # spectra") +
+        labs(title="TIC per spectrum and annotation group", x="TIC per spectrum", y = "Frequency = # spectra") +
         guides(fill=guide_legend(ncol=5,byrow=TRUE))+
-        geom_vline(xintercept = median(log(TICs[TICs>0])), size = 1, colour = "black",linetype = "dashed")
+        geom_vline(xintercept = median(TICs[TICs>0]), size = 1, colour = "black",linetype = "dashed")
         print(hist_10)}
 
     ################################## IV) properties over m/z ####################
@@ -541,11 +603,11 @@
     title(ylab="Intensity sum", line=4)
 
     ## 13b) histogram
-    hist(log(mzTIC), main="", xlab = "", las=1, ylab="")
+    hist(mzTIC, main="", xlab = "", las=1, ylab="")
     title(main="Sum of intensities per m/z", line=2, ylab="")
-    title(xlab = "log (sum of intensities per m/z)")
+    title(xlab = "sum of intensities per m/z")
     title(ylab = "Frequency", line=4)
-    abline(v=median(log(mzTIC[mzTIC>0])), col="blue")
+    abline(v=median(mzTIC[mzTIC>0]), col="blue")
 
     ################################## V) intensity plots ########################
     ############################################################################
@@ -563,11 +625,11 @@
         abline(v=abline_vector, lty = 3)}
 
     ## 14b) histogram: 
-    hist(log2(spectra(msidata)[]), main="", xlab = "", ylab="", las=1)
-    title(main="Log2-transformed intensities", line=2)
-    title(xlab="log2 intensities")
+    hist(spectra(msidata)[], main="", xlab = "", ylab="", las=1)
+    title(main="Intensity histogram", line=2)
+    title(xlab="intensities")
     title(ylab="Frequency", line=4)
-    abline(v=median(log2(spectra(msidata)[(spectra(msidata)>0)]), na.rm=TRUE), col="blue")
+    abline(v=median(spectra(msidata)[(spectra(msidata)>0)], na.rm=TRUE), col="blue")
 
 
     ## 14c) histogram to show contribution of annotation groups
@@ -576,22 +638,22 @@
 
         df_13 = data.frame(matrix(,ncol=2, nrow=0))
         for (subsample in levels(msidata\$annotation)){
-            log2_int_subsample = log2(spectra(msidata)[,msidata\$annotation==subsample])
+            log2_int_subsample = spectra(msidata)[,msidata\$annotation==subsample]
             df_subsample = data.frame(as.numeric(log2_int_subsample))
             df_subsample\$annotation = subsample
             df_13 = rbind(df_13, df_subsample)}
         df_13\$annotation = as.factor(df_13\$annotation)
-        colnames(df_13) = c("logint", "annotation")
+        colnames(df_13) = c("int", "annotation")
 
-        hist_13 = ggplot(df_13, aes(x=logint, fill=annotation)) +
+        hist_13 = ggplot(df_13, aes(x=int, fill=annotation)) +
         geom_histogram()+ theme_bw()+
         theme(text=element_text(family="ArialMT", face="bold", size=12))+
-        labs(title="Log2-transformed intensities per sample", x="log2 intensities", y = "Frequency") +
+        labs(title="Intensities per sample", x="intensities", y = "Frequency") +
         theme(plot.title = element_text(hjust = 0.5))+
         theme(legend.position="bottom",legend.direction="vertical")+
         theme(legend.key.size = unit(0.2, "line"), legend.text = element_text(size = 8))+
         guides(fill=guide_legend(ncol=5,byrow=TRUE))+
-        geom_vline(xintercept = median(log2(spectra(msidata)[(spectra(msidata)>0)])), size = 1, colour = "black",linetype = "dashed")
+        geom_vline(xintercept = median(spectra(msidata)[(spectra(msidata)>0)]), size = 1, colour = "black",linetype = "dashed")
         print(hist_13)
 
         ## 14d) boxplots to visualize in a different way the intensity distributions
@@ -602,7 +664,7 @@
             mean_mz_sample = rowMeans(spectra(msidata)[,msidata\$annotation==subsample],na.rm=TRUE)
             mean_matrix = cbind(mean_matrix, mean_mz_sample)}
 
-        boxplot(log2(mean_matrix), ylab = "log2 mean intensity per m/z", main="Mean m/z intensities per annotation group", xaxt = "n")
+        boxplot(mean_matrix, ylab = "Mean intensity per m/z", main="Mean m/z intensities per annotation group", xaxt = "n")
         (axis(1, at = c(1:number_combined), labels=levels(msidata\$annotation), las=2))
 
         ## 14e) Heatmap of pearson correlation on mean intensities between annotation groups
@@ -610,12 +672,16 @@
         corr_matrix = mean_matrix
         corr_matrix[corr_matrix == 0] <- NA
         colnames(corr_matrix) = levels(msidata\$annotation)
-        corr_matrix = cor(log2(corr_matrix), method= "pearson",use="complete.obs")
+        ## pearson correlation is only possible if there are at least 2 groups
+        if (length(colnames)>1)
+        {
+            corr_matrix = cor(corr_matrix, method= "pearson",use="complete.obs")
 
-        heatmap.parameters <- list(corr_matrix, 
-        show_rownames = T, show_colnames = T,
-        main = "Pearson correlation on mean intensities")
-        do.call("pheatmap", heatmap.parameters)
+            heatmap.parameters <- list(corr_matrix, 
+            show_rownames = T, show_colnames = T,
+            main = "Pearson correlation on mean intensities")
+            do.call("pheatmap", heatmap.parameters)
+        }
     }
 
     ################################## VI) Mass spectra and m/z accuracy ########################
@@ -624,20 +690,31 @@
 
     ############################ 15) Mass spectra ##############################
 
-    ## find three random pixel to plot their spectra in the following plots:
-    pixel1 = sample(pixelnumber,1)
-    pixel2 = sample(pixelnumber,1)
-    pixel3 = sample(pixelnumber,1)
-
     ## replace any NA with 0, otherwise plot function will not work at all
     msidata_no_NA = msidata
     spectra(msidata_no_NA)[is.na(spectra(msidata_no_NA)[])] = 0
 
+    ## find three equal m/z ranges for the average mass spectra plots: 
+    third_mz_range = nrow(msidata_no_NA)/3
+
     par(mfrow = c(2, 2), cex.axis=1, cex.lab=1, mar=c(5.1,4.1,4.1,2.1))
     plot(msidata_no_NA, pixel = 1:ncol(msidata_no_NA), main= "Average spectrum")
+    plot(msidata_no_NA[1:third_mz_range,], pixel = 1:ncol(msidata_no_NA), main= "Zoomed average spectrum")
+    plot(msidata_no_NA[third_mz_range:(2*third_mz_range),], pixel = 1:ncol(msidata_no_NA), main= "Zoomed average spectrum")
+    plot(msidata_no_NA[(2*third_mz_range):nrow(msidata_no_NA),], pixel = 1:ncol(msidata_no_NA), main= "Zoomed average spectrum")
+
+    ## plot 4 random mass spectra
+    ## find four random pixel to plot their spectra in the following plots:
+    pixel1 = sample(pixelnumber,1)
+    pixel2 = sample(pixelnumber,1)
+    pixel3 = sample(pixelnumber,1)
+    pixel4 = sample(pixelnumber,1)
+
+    par(mfrow = c(2, 2), cex.axis=1, cex.lab=1, mar=c(5.1,4.1,4.1,2.1))
     plot(msidata_no_NA, pixel = pixel1, main=paste0("Spectrum at ", rownames(coord(msidata_no_NA)[pixel1,1:2])))
-    plot(msidata_no_NA, pixel = pixel2, main= paste0("Spectrum at ", rownames(coord(msidata_no_NA)[pixel2,1:2])))
+    plot(msidata_no_NA, pixel = pixel2, main=paste0("Spectrum at ", rownames(coord(msidata_no_NA)[pixel2,1:2])))
     plot(msidata_no_NA, pixel = pixel3, main= paste0("Spectrum at ", rownames(coord(msidata_no_NA)[pixel3,1:2])))
+    plot(msidata_no_NA, pixel = pixel4, main= paste0("Spectrum at ", rownames(coord(msidata_no_NA)[pixel4,1:2])))
 
     ################### 16) Zoomed in mass spectra for calibrants ##############
 
@@ -653,8 +730,12 @@
         for (mass in 1:length(inputcalibrantmasses)){
 
             ### define the plot window with xmin und xmax
-            minmasspixel = features(msidata_no_NA, mz=inputcalibrantmasses[mass]-0.5)
-            maxmasspixel = features(msidata_no_NA, mz=inputcalibrantmasses[mass]+1.5)
+            minmasspixel1 = features(msidata_no_NA, mz=inputcalibrantmasses[mass]-0.5)
+            maxmasspixel1 = features(msidata_no_NA, mz=inputcalibrantmasses[mass]+1.5)
+            minmasspixel2 = features(msidata_no_NA, mz=inputcalibrantmasses[mass]-0.25)
+            maxmasspixel2 = features(msidata_no_NA, mz=inputcalibrantmasses[mass]+0.5)
+            minmasspixel3 = features(msidata_no_NA, mz=inputcalibrantmasses[mass]-3)
+            maxmasspixel3 = features(msidata_no_NA, mz=inputcalibrantmasses[mass]+3)
 
             ### find m/z with the highest mean intensity in m/z range (red line in plot 16) and calculate ppm difference for plot 17
             filtered_data = msidata_no_NA[mz(msidata_no_NA) >= inputcalibrantmasses[mass]-plusminusvalues[mass] & mz(msidata_no_NA) <= inputcalibrantmasses[mass]+plusminusvalues[mass],]
@@ -679,20 +760,20 @@
             ## plotting of 4 spectra in one page
             par(mfrow = c(2, 2), oma=c(0,0,2,0))
             ## average plot
-            plot(msidata_no_NA[minmasspixel:maxmasspixel,], pixel = 1:length(pixelnumber), main= "Average spectrum")
+            plot(msidata_no_NA[minmasspixel1:maxmasspixel1,], pixel = 1:length(pixelnumber), main= "Average spectrum")
             abline(v=c(inputcalibrantmasses[mass] -plusminusvalues[count], inputcalibrantmasses[mass] ,inputcalibrantmasses[mass] +plusminusvalues[count]), col="blue", lty=c(3,5,3))
             abline(v=c(maxvalue), col="red", lty=2)
             abline(v=c(mzvalue), col="green2", lty=4)
             ## average plot including points per data point
-            plot(msidata_no_NA[minmasspixel:maxmasspixel,], pixel = 1:length(pixelnumber), main="Average spectrum with data points")
-            points(mz(msidata_no_NA[minmasspixel:maxmasspixel,]), rowMeans(spectra(msidata_no_NA)[minmasspixel:maxmasspixel,]), col="blue", pch=20)
-            ## plot of a random pixel (1)
-            plot(msidata_no_NA[minmasspixel:maxmasspixel,], pixel = pixel2, main= paste0("Spectrum at ", rownames(coord(msidata_no_NA)[pixel2,1:2])))
+            plot(msidata_no_NA[minmasspixel1:maxmasspixel1,], pixel = 1:length(pixelnumber), main="Average spectrum with data points")
+            points(mz(msidata_no_NA[minmasspixel1:maxmasspixel1,]), rowMeans(spectra(msidata_no_NA)[minmasspixel1:maxmasspixel1,]), col="blue", pch=20)
+            ## plot of third average plot
+            plot(msidata_no_NA[minmasspixel2:maxmasspixel2,], pixel = 1:length(pixelnumber), main= "Average spectrum")
             abline(v=c(inputcalibrantmasses[mass] -plusminusvalues[count], inputcalibrantmasses[mass] ,inputcalibrantmasses[mass] +plusminusvalues[count]), col="blue", lty=c(3,5,3))
             abline(v=c(maxvalue), col="red", lty=2)
             abline(v=c(mzvalue), col="green2", lty=4)
-            ## plot of a random pixel (2)
-            plot(msidata_no_NA[minmasspixel:maxmasspixel,], pixel = pixel3, main= paste0("Spectrum at ", rownames(coord(msidata_no_NA)[pixel3,1:2])))
+            ## plot of fourth average plot
+            plot(msidata_no_NA[minmasspixel3:maxmasspixel3,], pixel = 1:length(pixelnumber), main= "Average spectrum")
             abline(v=c(inputcalibrantmasses[mass] -plusminusvalues[count], inputcalibrantmasses[mass] ,inputcalibrantmasses[mass] +plusminusvalues[count]), col="blue", lty=c(3,5,3))
             abline(v=c(maxvalue), col="red", lty=2)
             abline(v=c(mzvalue), col="green2", lty=4)
@@ -707,13 +788,17 @@
                     key_zoomed = TRUE
                 }else{key_zoomed = FALSE}
                 par(mfrow = c(1, 1))
-                plot(msidata_no_NA[minmasspixel:maxmasspixel,], pixel=1:ncol(msidata_no_NA),main="Average spectrum per annotation group",
+                plot(msidata_no_NA[minmasspixel1:maxmasspixel1,], pixel=1:ncol(msidata_no_NA),main="Average spectrum per annotation group",
                 pixel.groups=msidata\$annotation, key=key_zoomed, col=hue_pal()(number_combined),superpose=TRUE)
                 abline(v=c(inputcalibrantmasses[mass] -plusminusvalues[count], inputcalibrantmasses[mass] ,inputcalibrantmasses[mass] +plusminusvalues[count]), col="black", lty=c(3,1,3))
             }
             count=count+1
         }
 
+    ## remove msidata_no_NA to clean up RAM space
+        rm(msidata_no_NA)
+        gc()
+
     ######### 17) ppm difference input calibrant m/z and m/z with max intensity in given m/z range#########
 
         par(mfrow = c(1,1))
@@ -755,7 +840,6 @@
         #################### 19) ppm difference over pixels #####################
 
         par(mfrow = c(1,1))
-        mycolours = c("darkgrey", "darkblue", "blue", "green" , "red", "orange", "yellow", "magenta", "olivedrab1", "lightseagreen")
         count = 1
         ppm_df = as.data.frame(matrix(,ncol=0, nrow = ncol(msidata)))
         for (calibrant in inputcalibrantmasses){
@@ -763,16 +847,16 @@
             filtered_data = msidata[mz(msidata) >= calibrant-plusminusvalues[count] & mz(msidata) <= calibrant+plusminusvalues[count],]
 
             if (nrow(filtered_data) > 0){
-                ### filtered for m/z range, find max peak in each spectrum (pixel)(
+                ### filtered for m/z range, find max peak in each spectrum
                 ppm_vector = numeric()
                 for (pixel_count in 1:ncol(filtered_data)){
+                    ## for each spectrum (pixel_count) find the m/z that has the highest intensity
                     mz_max = mz(filtered_data)[which.max(spectra(filtered_data)[,pixel_count])]
-
                     mzdiff = mz_max - calibrant
                     ppmdiff = mzdiff/calibrant*1000000 
 
                     ### if maximum intensity in m/z range was 0 set ppm diff to NA (not shown in plot)
-                    if (max(spectra(filtered_data)[,pixel_count]) == 0){
+                    if (max(spectra(filtered_data)[,pixel_count]) == 0 || is.na(max(spectra(filtered_data)[,pixel_count]))){
                         ppmdiff = NA}
                     ppm_vector[pixel_count] = ppmdiff}
 
@@ -799,6 +883,24 @@
              if (!is.null(levels(msidata\$annotation))){
                 abline(v=abline_vector, lty = 3)}}
 
+            ### make x-y-images for mz accuracy
+
+            ppm_dataframe = cbind(coord(msidata)[,1:2], ppm_df)
+
+            for (each_cal in 1:ncol(ppm_df)){
+                tmp_ppm = ppm_dataframe[,c(1,2,each_cal+2)]
+                tmp_ppm[,3] = as.numeric(tmp_ppm[,3])
+                colnames(tmp_ppm) = c("x","y", "ppm_each_cal")
+
+                print(ggplot(tmp_ppm, aes(x=x, y=y, fill=ppm_each_cal))+
+                 geom_tile() + coord_fixed() +
+                 ggtitle(paste0("m/z accuracy for ",inputcalibrants[,2][each_cal]))+
+                 theme_bw() +
+                 theme(plot.title = element_text(hjust = 0.5))+
+                 theme(text=element_text(family="ArialMT", face="bold", size=12))+
+                 scale_fill_gradient2(low = "navy", mid = "white", high = "red", midpoint = 0 ,space = "Lab", na.value = "black", name = "ppm\nerror"))}
+
+
     }else{print("plot 16+17+18+19) The inputcalibrant m/z were not provided or outside the m/z range")}
 }else{
     print("inputfile has no intensities > 0")
@@ -827,7 +929,7 @@
         <repeat name="calibrantratio" title="Plot fold change of two m/z" min="0" max="10">
             <param name="mass1" value="1111" type="float" label="M/z 1" help="First m/z"/>
             <param name="mass2" value="2222" type="float" label="M/z 2" help="Second m/z"/>
-            <param name="distance" value="0.25" type="float" label="M/z range" help="Plusminus m/z window added to input m/z. In both m/z ranges the maximum intensity is used to calculate the fold change"/>
+            <param name="distance" value="200" type="float" label="ppm range" help="Will be added in both directions to input calibrant m/z and intensities will be averaged in this range."/>
             <param name="filenameratioplot" type="text" optional="true" label="Title" help="Optional title for fold change plot.">
                 <sanitizer invalid_char="">
                     <valid initial="string.ascii_letters,string.digits">
@@ -836,14 +938,16 @@
                 </sanitizer>
             </param>
         </repeat>
-        <param name="pixel_output" type="boolean" label="Tabular output with spectra information"/>
     </inputs>
     <outputs>
-        <data format="pdf" name="QC_report" from_work_dir="qualitycontrol.pdf" label = "${tool.name} on ${on_string}"/>
+        <data format="pdf" name="QC_report" from_work_dir="qualitycontrol.pdf" label = "${tool.name} on ${on_string}: results"/>
     </outputs>
     <tests>
         <test>
-            <expand macro="infile_imzml"/>
+            <param name="infile" value="" ftype="imzml">
+                <composite_data value="Example_Processed.imzML"/>
+                <composite_data value="Example_Processed.ibd"/>
+            </param>
             <conditional name="processed_cond">
                 <param name="processed_file" value="processed"/>
                 <param name="accuracy" value="200"/>
@@ -861,7 +965,7 @@
             <repeat name="calibrantratio">
                 <param name="mass1" value="328.9"/>
                 <param name="mass2" value="398.8"/>
-                <param name="distance" value="0.25"/>
+                <param name="distance" value="500"/>
                 <param name="filenameratioplot" value = "Ratio of mass1 (328.9) / mass2 (398.8)"/>
             </repeat>
             <output name="QC_report" file="QC_imzml.pdf" compare="sim_size"/>
@@ -919,8 +1023,11 @@
 @MSIDATA_INPUT_DESCRIPTION@
 - Coordinates stored as decimals rather than integers will be rounded to obtain a regular pixel grid. This might lead to duplicated coordinates which will be automatically removed before the tools analysis starts. 
 @SPECTRA_TABULAR_INPUT_DESCRIPTION@
-    
+            - at least two different annotations should be in the annotation column
+
 @MZ_2COLS_TABULAR_INPUT_DESCRIPTION@
+            - maximum of 9 m/z values per run are supported
+            - names should be unique
 
 **Options**
 
@@ -956,20 +1063,21 @@
 - Pixel order: Shows the order of the pixels in the provided file. Depending on the instrument this can represent the acquisition order. If annotation file is provided pixels are ordered according to annotation groups. 
 - (cal) Number of calibrants per pixel: In every spectrum the calibrant m/z window (calibrant m/z plusminus 'ppm range') is searched for peaks (intensity > 0). Calibrants are considered present in a spectrum when they have at least one peak in their m/z window. 
 - (FC) Control of fold change plot: For both input m/z a zoomed in average spectrum is drawn with the input m/z as blue dashed line, the m/z range as blue dotted lines and the maximum intensity in the m/z window with a red line. 
-- (FC) Fold change image: For each spectrum the intensities of the two optimal m/z features (red lines in control plots) are divided and log2 transformed to obtain the fold change, which is then plotted as a heatmap. 
+- (FC) Fold change image: For each input m/z the average intensity within the given ppm range is calculated, then the log2 fold change of both average intensities is taken and plotted as heatmap. 
 - (cal) Intensity heatmaps for the m/z value that is closest to the calibrant m/z. The intensities are averaged within the calibrant m/z window (ppm range). 
 - Number of peaks per spectrum: For each spectrum the number of m/z values with intensity > 0 is calculated and plotted as heatmap.
 - Total ion chromatogram: For each spectrum all intensities are summed up to obtain the TIC which is plotted as heatmap. 
 - Median intensity: For each spectrum the median intensity is plotted as heatmap. 
+- Maximum intensity: For each spectrum the maximum intensity is plotted as heatmap. 
 - Most abundant m/z in each spectrum: For each spectrum the m/z value with the highest intensity is plotted. 
-- PCA for two components: Result of a principal component analysis (PCA) for two components is given. The loading plot depicts the contribution of each m/z value and the x-y image represents the differences between the pixels. 
+- PCA for two components: Result of a principal component analysis (PCA) for two components is given. The loading plot depicts the contribution of each m/z value and the x-y image represents the differences between the pixels, principal components 1 and 2 are also plotted as x-y image.
 
 **Properties over spectra/pixels**
 
 - Number of peaks per spectrum: Scatter plot and histogram showing the number of intensities > 0 for each spectrum. If annotation tabular file is provided, the pixels are sorted according to annotation groups and the dotted lines in the scatter plot separate spectra of different annotation groups.
 - (annot) Number of peaks per spectrum and annotation group: Same histogram as in plot before but with colours to show the contribution of each pixel annotation group.
 - TIC per spectrum: Scatter plot and histogram showing the sum of all intensities per spectrum (TIC). Dotted lines in the scatter plot separate spectra of different annotation groups.
-- (annot) TIC per spectrum and annotation group: Same histogram as in plot before but with colours to show the contribution of each pixel annotation group. 
+- (annot) TIC per spectrum and annotation group: Same histogram as in plot before but with colours to show the contribution of each pixel annotation group. Only the length of the coloured bar is important and not its height from zero, as bars are added up and not overlayed. 
 
 **Properties over m/z features**
 
@@ -980,19 +1088,20 @@
 **Intensity plots**
 
 - Median intensity per spectrum: Scatter plot in which each point represents the median intensity for one spectrum. Dotted lines in the scatter plot separate spectra of different annotation groups.
-- Log2-transformed intensities: Histogram of log2-transformed intensities. 
-- (annot) log2-transformed intensities per annotation group: Same histogram as before but with colours to show the contribution of each pixel annotation group. 
+- Histogram of intensities. 
+- (annot) Intensities per annotation group: Same histogram as before but with colours to show the contribution of each pixel annotation group. 
 - (annot) Mean intensities per m/z and annotation group: For all pixels of an annotation group the mean intensity for each m/z is calculated and shown as boxplot. 
-- (annot) Pearson correlation between annotation groups based on mean intensities and shown as heatmap.
+- (annot) Pearson correlation between annotation groups (needs at least 2 groups) based on mean intensities and shown as heatmap.
 
 **Mass spectra and m/z accuracy**
 
-- Mass spectra over the full m/z range: First plot shows the average intensities over all spectra. The other three mass spectra are from random individual pixels (spectra). 
-- (cal) For each calibrant four zoomed in mass spectrum are drawn: The first two mass spectra show the average intensities over all spectra and the other two specra are from random individual pixels. The theoretical calibrant m/z (taken from the input file) is represented by the dashed blue line. The dotted blue lines show the given ppm range. The green line is the m/z value that is closest to the theoretical calibrant and the red line is the m/z with the highest average intensity in the m/z window. In the second average spectra plot each blue plot indicates one data point.
+- Average mass spectra: First plot shows the average spectrum over the full m/z range, the other three plots zoom into the m/z axis.
+- (cal) For each calibrant four zoomed average mass spectrum are drawn with different zooming level. The theoretical calibrant m/z (taken from the input file) is represented by the dashed blue line. The dotted blue lines show the given ppm range. The green line is the m/z value that is closest to the theoretical calibrant and the red line is the m/z with the highest average intensity in the m/z window. In the second spectrum each blue dot indicates one data point.
 - (annot) Average spectrum per annotation group: For each calibrant a zoomed in mass spectrum is plotted this time with the average intensities for each annotation group separately. 
 - (cal) Difference m/z with max. average intensity vs. theor. calibrant m/z: The difference in ppm between the m/z with the highest average intensity and the theoretical m/z are plotted for each calibrant. This corresponds to the difference between the dashed blue line and the red line in the zoomed in mass spectra. 
 - (cal) Difference closest measured m/z vs. theor. calibrant m/z: The difference in ppm between the closest m/z value and the theoretical m/z values are plotted for each calibrant. This corresponds to the difference between the dashed blue line and the green line in the zoomed in mass spectra. 
 - (cal) Difference m/z with max. average intensity vs. theor. m/z (per spectrum): For each spectrum the ppm difference between the m/z with the highest average intensity and the theoretical m/z are plotted. The calibrants have different plotting colours. Dashed lines separate spectra of different annotation groups. 
+- (cal) Same m/z accuracy in ppm is plotted per calibrant and per spectrum as image in x-y dimension.
 
 
         ]]>
Binary file test-data/112_auto_combined.RData has changed
Binary file test-data/112_auto_combined.ibd has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/112_auto_combined.imzml	Fri Feb 15 10:21:09 2019 -0500
@@ -0,0 +1,475 @@
+<?xml version="1.0"?>
+<mzML version="1.1" xmlns="http://psi.hupo.org/ms/mzml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://psi.hupo.org/ms/mzml http://psidev.info/files/ms/mzML/xsd/mzML1.1.0_idx.xsd">
+	<cvList count="3">
+		<cv id="MS" fullName="Proteomics Standards Initiative Mass Spectrometry Ontology" version="1.3.1" URI="http://psidev.info/ms/mzML/psi-ms.obo" />
+		<cv id="UO" fullName="Unit Ontology" version="1.15" URI="http://obo.cvs.sourceforge.net/obo/obo/ontology/phenotype/unit.obo" />
+		<cv id="IMS" fullName="Imaging MS Ontology" version="0.9.1" URI="http://www.maldi-msi.org/download/imzml/imagingMS.obo" />
+	</cvList>
+	<fileDescription>
+		<fileContent>
+			<cvParam cvRef="MS" accession="MS:1000579" name="MS1 spectrum" value="" />
+			<cvParam cvRef="MS" accession="MS:1000128" name="profile spectrum" value="" />
+			<cvParam cvRef="IMS" accession="IMS:1000080" name="universally unique identifier" value="{00A83E55-A8F8-41D4-BBAC-345FA77AAB7E}" />
+			<cvParam cvRef="IMS" accession="IMS:1000091" name="ibd SHA-1" value="9B17E43E3D3B35BE3CD0AE65F40E0C6B27C2752F" />
+			<cvParam cvRef="IMS" accession="IMS:1000030" name="continuous" value="" />
+		</fileContent>
+	</fileDescription>
+	<referenceableParamGroupList count="4">
+		<referenceableParamGroup id="spectrum1">
+			<cvParam cvRef="MS" accession="MS:1000579" name="MS1 spectrum" value="" />
+			<cvParam cvRef="MS" accession="MS:1000511" name="ms level" value="0" />
+			<cvParam cvRef="MS" accession="MS:1000128" name="profile spectrum" value="" />
+		</referenceableParamGroup>
+		<referenceableParamGroup id="scan1">
+			<cvParam cvRef="MS" accession="MS:1000093" name="increasing m/z scan" value="" />
+			<cvParam cvRef="MS" accession="MS:1000095" name="linear" value="" />
+		</referenceableParamGroup>
+		<referenceableParamGroup id="mzArray">
+			<cvParam cvRef="MS" accession="MS:1000576" name="no compression" value="" />
+			<cvParam cvRef="MS" accession="MS:1000514" name="m/z array" value="" unitCvRef="MS" unitAccession="MS:1000040" unitName="m/z" />
+			<cvParam cvRef="IMS" accession="IMS:1000101" name="external data" value="true" />
+			<cvParam cvRef="MS" accession="MS:1000521" name="32-bit float" value="32-bit float" />
+		</referenceableParamGroup>
+		<referenceableParamGroup id="intensityArray">
+			<cvParam cvRef="MS" accession="MS:1000576" name="no compression" value="" />
+			<cvParam cvRef="MS" accession="MS:1000515" name="intensity array" value="" unitCvRef="MS" unitAccession="MS:1000131" unitName="number of counts" />
+			<cvParam cvRef="IMS" accession="IMS:1000101" name="external data" value="true" />
+			<cvParam cvRef="MS" accession="MS:1000521" name="32-bit float" value="32-bit float" />
+		</referenceableParamGroup>
+	</referenceableParamGroupList>
+	<sampleList count="1">
+		<sample id="sample1" name="Sample1">
+			<cvParam cvRef="MS" accession="MS:1000001" name="sample number" value="1" />
+		</sample>
+	</sampleList>
+	<softwareList count="1">
+		<software id="Cardinal" version="1.12.1">
+			<cvParam cvRef="MS" accession="MS:1000799" name="custom unreleased software tool" value="" />
+		</software>
+	</softwareList>
+	<scanSettingsList count="1">
+		<scanSettings id="scansettings1">
+			<cvParam cvRef="IMS" accession="IMS:1000042" name="max count of pixel x" value="15" />
+			<cvParam cvRef="IMS" accession="IMS:1000043" name="max count of pixel y" value="3" />
+		</scanSettings>
+	</scanSettingsList>
+	<instrumentConfigurationList count="1">
+		<instrumentConfiguration id="IC1" />
+	</instrumentConfigurationList>
+	<dataProcessingList count="1">
+		<dataProcessing id="CardinalWriteImzML">
+			<processingMethod order="1" softwareRef="Cardinal">
+				<cvParam cvRef="MS" accession="MS:1000544" name="Conversion to mzML" value="" />
+			</processingMethod>
+		</dataProcessing>
+	</dataProcessingList>
+	<run defaultInstrumentConfigurationRef="IC1" id="Experiment01" sampleRef="sample1">
+		<spectrumList count="15" defaultDataProcessingRef="CardinalWriteImzML">
+			<spectrum id="Spectrum=1" defaultArrayLength="0" index="1">
+				<referenceableParamGroupRef ref="spectrum1" />
+				<scanList count="1">
+					<cvParam cvRef="MS" accession="MS:1000795" name="no combination" value="" />
+					<scan instrumentConfigurationRef="IC1">
+						<referenceableParamGroupRef ref="scan1" />
+						<cvParam cvRef="IMS" accession="IMS:1000050" name="position x" value="1" />
+						<cvParam cvRef="IMS" accession="IMS:1000051" name="position y" value="1" />
+					</scan>
+				</scanList>
+				<binaryDataArrayList count="2">
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="mzArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="16" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="8399" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="33596" />
+						<binary />
+					</binaryDataArray>
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="intensityArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="33612" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="8399" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="33596" />
+						<binary />
+					</binaryDataArray>
+				</binaryDataArrayList>
+			</spectrum>
+			<spectrum id="Spectrum=2" defaultArrayLength="0" index="2">
+				<referenceableParamGroupRef ref="spectrum1" />
+				<scanList count="1">
+					<cvParam cvRef="MS" accession="MS:1000795" name="no combination" value="" />
+					<scan instrumentConfigurationRef="IC1">
+						<referenceableParamGroupRef ref="scan1" />
+						<cvParam cvRef="IMS" accession="IMS:1000050" name="position x" value="1" />
+						<cvParam cvRef="IMS" accession="IMS:1000051" name="position y" value="2" />
+					</scan>
+				</scanList>
+				<binaryDataArrayList count="2">
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="mzArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="16" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="8399" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="33596" />
+						<binary />
+					</binaryDataArray>
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="intensityArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="67208" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="8399" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="33596" />
+						<binary />
+					</binaryDataArray>
+				</binaryDataArrayList>
+			</spectrum>
+			<spectrum id="Spectrum=3" defaultArrayLength="0" index="3">
+				<referenceableParamGroupRef ref="spectrum1" />
+				<scanList count="1">
+					<cvParam cvRef="MS" accession="MS:1000795" name="no combination" value="" />
+					<scan instrumentConfigurationRef="IC1">
+						<referenceableParamGroupRef ref="scan1" />
+						<cvParam cvRef="IMS" accession="IMS:1000050" name="position x" value="1" />
+						<cvParam cvRef="IMS" accession="IMS:1000051" name="position y" value="3" />
+					</scan>
+				</scanList>
+				<binaryDataArrayList count="2">
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="mzArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="16" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="8399" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="33596" />
+						<binary />
+					</binaryDataArray>
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="intensityArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="100804" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="8399" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="33596" />
+						<binary />
+					</binaryDataArray>
+				</binaryDataArrayList>
+			</spectrum>
+			<spectrum id="Spectrum=4" defaultArrayLength="0" index="4">
+				<referenceableParamGroupRef ref="spectrum1" />
+				<scanList count="1">
+					<cvParam cvRef="MS" accession="MS:1000795" name="no combination" value="" />
+					<scan instrumentConfigurationRef="IC1">
+						<referenceableParamGroupRef ref="scan1" />
+						<cvParam cvRef="IMS" accession="IMS:1000050" name="position x" value="7" />
+						<cvParam cvRef="IMS" accession="IMS:1000051" name="position y" value="1" />
+					</scan>
+				</scanList>
+				<binaryDataArrayList count="2">
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="mzArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="16" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="8399" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="33596" />
+						<binary />
+					</binaryDataArray>
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="intensityArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="134400" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="8399" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="33596" />
+						<binary />
+					</binaryDataArray>
+				</binaryDataArrayList>
+			</spectrum>
+			<spectrum id="Spectrum=5" defaultArrayLength="0" index="5">
+				<referenceableParamGroupRef ref="spectrum1" />
+				<scanList count="1">
+					<cvParam cvRef="MS" accession="MS:1000795" name="no combination" value="" />
+					<scan instrumentConfigurationRef="IC1">
+						<referenceableParamGroupRef ref="scan1" />
+						<cvParam cvRef="IMS" accession="IMS:1000050" name="position x" value="7" />
+						<cvParam cvRef="IMS" accession="IMS:1000051" name="position y" value="2" />
+					</scan>
+				</scanList>
+				<binaryDataArrayList count="2">
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="mzArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="16" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="8399" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="33596" />
+						<binary />
+					</binaryDataArray>
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="intensityArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="167996" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="8399" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="33596" />
+						<binary />
+					</binaryDataArray>
+				</binaryDataArrayList>
+			</spectrum>
+			<spectrum id="Spectrum=6" defaultArrayLength="0" index="6">
+				<referenceableParamGroupRef ref="spectrum1" />
+				<scanList count="1">
+					<cvParam cvRef="MS" accession="MS:1000795" name="no combination" value="" />
+					<scan instrumentConfigurationRef="IC1">
+						<referenceableParamGroupRef ref="scan1" />
+						<cvParam cvRef="IMS" accession="IMS:1000050" name="position x" value="7" />
+						<cvParam cvRef="IMS" accession="IMS:1000051" name="position y" value="3" />
+					</scan>
+				</scanList>
+				<binaryDataArrayList count="2">
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="mzArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="16" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="8399" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="33596" />
+						<binary />
+					</binaryDataArray>
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="intensityArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="201592" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="8399" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="33596" />
+						<binary />
+					</binaryDataArray>
+				</binaryDataArrayList>
+			</spectrum>
+			<spectrum id="Spectrum=7" defaultArrayLength="0" index="7">
+				<referenceableParamGroupRef ref="spectrum1" />
+				<scanList count="1">
+					<cvParam cvRef="MS" accession="MS:1000795" name="no combination" value="" />
+					<scan instrumentConfigurationRef="IC1">
+						<referenceableParamGroupRef ref="scan1" />
+						<cvParam cvRef="IMS" accession="IMS:1000050" name="position x" value="9" />
+						<cvParam cvRef="IMS" accession="IMS:1000051" name="position y" value="1" />
+					</scan>
+				</scanList>
+				<binaryDataArrayList count="2">
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="mzArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="16" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="8399" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="33596" />
+						<binary />
+					</binaryDataArray>
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="intensityArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="235188" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="8399" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="33596" />
+						<binary />
+					</binaryDataArray>
+				</binaryDataArrayList>
+			</spectrum>
+			<spectrum id="Spectrum=8" defaultArrayLength="0" index="8">
+				<referenceableParamGroupRef ref="spectrum1" />
+				<scanList count="1">
+					<cvParam cvRef="MS" accession="MS:1000795" name="no combination" value="" />
+					<scan instrumentConfigurationRef="IC1">
+						<referenceableParamGroupRef ref="scan1" />
+						<cvParam cvRef="IMS" accession="IMS:1000050" name="position x" value="10" />
+						<cvParam cvRef="IMS" accession="IMS:1000051" name="position y" value="1" />
+					</scan>
+				</scanList>
+				<binaryDataArrayList count="2">
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="mzArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="16" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="8399" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="33596" />
+						<binary />
+					</binaryDataArray>
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="intensityArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="268784" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="8399" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="33596" />
+						<binary />
+					</binaryDataArray>
+				</binaryDataArrayList>
+			</spectrum>
+			<spectrum id="Spectrum=9" defaultArrayLength="0" index="9">
+				<referenceableParamGroupRef ref="spectrum1" />
+				<scanList count="1">
+					<cvParam cvRef="MS" accession="MS:1000795" name="no combination" value="" />
+					<scan instrumentConfigurationRef="IC1">
+						<referenceableParamGroupRef ref="scan1" />
+						<cvParam cvRef="IMS" accession="IMS:1000050" name="position x" value="9" />
+						<cvParam cvRef="IMS" accession="IMS:1000051" name="position y" value="2" />
+					</scan>
+				</scanList>
+				<binaryDataArrayList count="2">
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="mzArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="16" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="8399" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="33596" />
+						<binary />
+					</binaryDataArray>
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="intensityArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="302380" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="8399" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="33596" />
+						<binary />
+					</binaryDataArray>
+				</binaryDataArrayList>
+			</spectrum>
+			<spectrum id="Spectrum=10" defaultArrayLength="0" index="10">
+				<referenceableParamGroupRef ref="spectrum1" />
+				<scanList count="1">
+					<cvParam cvRef="MS" accession="MS:1000795" name="no combination" value="" />
+					<scan instrumentConfigurationRef="IC1">
+						<referenceableParamGroupRef ref="scan1" />
+						<cvParam cvRef="IMS" accession="IMS:1000050" name="position x" value="10" />
+						<cvParam cvRef="IMS" accession="IMS:1000051" name="position y" value="2" />
+					</scan>
+				</scanList>
+				<binaryDataArrayList count="2">
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="mzArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="16" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="8399" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="33596" />
+						<binary />
+					</binaryDataArray>
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="intensityArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="335976" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="8399" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="33596" />
+						<binary />
+					</binaryDataArray>
+				</binaryDataArrayList>
+			</spectrum>
+			<spectrum id="Spectrum=11" defaultArrayLength="0" index="11">
+				<referenceableParamGroupRef ref="spectrum1" />
+				<scanList count="1">
+					<cvParam cvRef="MS" accession="MS:1000795" name="no combination" value="" />
+					<scan instrumentConfigurationRef="IC1">
+						<referenceableParamGroupRef ref="scan1" />
+						<cvParam cvRef="IMS" accession="IMS:1000050" name="position x" value="9" />
+						<cvParam cvRef="IMS" accession="IMS:1000051" name="position y" value="3" />
+					</scan>
+				</scanList>
+				<binaryDataArrayList count="2">
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="mzArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="16" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="8399" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="33596" />
+						<binary />
+					</binaryDataArray>
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="intensityArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="369572" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="8399" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="33596" />
+						<binary />
+					</binaryDataArray>
+				</binaryDataArrayList>
+			</spectrum>
+			<spectrum id="Spectrum=12" defaultArrayLength="0" index="12">
+				<referenceableParamGroupRef ref="spectrum1" />
+				<scanList count="1">
+					<cvParam cvRef="MS" accession="MS:1000795" name="no combination" value="" />
+					<scan instrumentConfigurationRef="IC1">
+						<referenceableParamGroupRef ref="scan1" />
+						<cvParam cvRef="IMS" accession="IMS:1000050" name="position x" value="10" />
+						<cvParam cvRef="IMS" accession="IMS:1000051" name="position y" value="3" />
+					</scan>
+				</scanList>
+				<binaryDataArrayList count="2">
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="mzArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="16" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="8399" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="33596" />
+						<binary />
+					</binaryDataArray>
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="intensityArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="403168" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="8399" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="33596" />
+						<binary />
+					</binaryDataArray>
+				</binaryDataArrayList>
+			</spectrum>
+			<spectrum id="Spectrum=13" defaultArrayLength="0" index="13">
+				<referenceableParamGroupRef ref="spectrum1" />
+				<scanList count="1">
+					<cvParam cvRef="MS" accession="MS:1000795" name="no combination" value="" />
+					<scan instrumentConfigurationRef="IC1">
+						<referenceableParamGroupRef ref="scan1" />
+						<cvParam cvRef="IMS" accession="IMS:1000050" name="position x" value="15" />
+						<cvParam cvRef="IMS" accession="IMS:1000051" name="position y" value="1" />
+					</scan>
+				</scanList>
+				<binaryDataArrayList count="2">
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="mzArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="16" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="8399" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="33596" />
+						<binary />
+					</binaryDataArray>
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="intensityArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="436764" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="8399" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="33596" />
+						<binary />
+					</binaryDataArray>
+				</binaryDataArrayList>
+			</spectrum>
+			<spectrum id="Spectrum=14" defaultArrayLength="0" index="14">
+				<referenceableParamGroupRef ref="spectrum1" />
+				<scanList count="1">
+					<cvParam cvRef="MS" accession="MS:1000795" name="no combination" value="" />
+					<scan instrumentConfigurationRef="IC1">
+						<referenceableParamGroupRef ref="scan1" />
+						<cvParam cvRef="IMS" accession="IMS:1000050" name="position x" value="15" />
+						<cvParam cvRef="IMS" accession="IMS:1000051" name="position y" value="2" />
+					</scan>
+				</scanList>
+				<binaryDataArrayList count="2">
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="mzArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="16" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="8399" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="33596" />
+						<binary />
+					</binaryDataArray>
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="intensityArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="470360" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="8399" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="33596" />
+						<binary />
+					</binaryDataArray>
+				</binaryDataArrayList>
+			</spectrum>
+			<spectrum id="Spectrum=15" defaultArrayLength="0" index="15">
+				<referenceableParamGroupRef ref="spectrum1" />
+				<scanList count="1">
+					<cvParam cvRef="MS" accession="MS:1000795" name="no combination" value="" />
+					<scan instrumentConfigurationRef="IC1">
+						<referenceableParamGroupRef ref="scan1" />
+						<cvParam cvRef="IMS" accession="IMS:1000050" name="position x" value="15" />
+						<cvParam cvRef="IMS" accession="IMS:1000051" name="position y" value="3" />
+					</scan>
+				</scanList>
+				<binaryDataArrayList count="2">
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="mzArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="16" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="8399" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="33596" />
+						<binary />
+					</binaryDataArray>
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="intensityArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="503956" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="8399" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="33596" />
+						<binary />
+					</binaryDataArray>
+				</binaryDataArrayList>
+			</spectrum>
+		</spectrumList>
+	</run>
+</mzML>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/112_auto_combined.imzml.txt	Fri Feb 15 10:21:09 2019 -0500
@@ -0,0 +1,4 @@
+imzML file:
+total 556
+-rw-r--r-- 1 meli meli 537552 Feb 12 12:25 ibd
+-rw-r--r-- 1 meli meli  25466 Feb 12 12:25 imzml
Binary file test-data/112_auto_combined_QC.pdf has changed
Binary file test-data/123_annotation.ibd has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/123_annotation.imzml	Fri Feb 15 10:21:09 2019 -0500
@@ -0,0 +1,394 @@
+<?xml version="1.0"?>
+<mzML version="1.1" xmlns="http://psi.hupo.org/ms/mzml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://psi.hupo.org/ms/mzml http://psidev.info/files/ms/mzML/xsd/mzML1.1.0_idx.xsd">
+	<cvList count="3">
+		<cv id="MS" fullName="Proteomics Standards Initiative Mass Spectrometry Ontology" version="1.3.1" URI="http://psidev.info/ms/mzML/psi-ms.obo" />
+		<cv id="UO" fullName="Unit Ontology" version="1.15" URI="http://obo.cvs.sourceforge.net/obo/obo/ontology/phenotype/unit.obo" />
+		<cv id="IMS" fullName="Imaging MS Ontology" version="0.9.1" URI="http://www.maldi-msi.org/download/imzml/imagingMS.obo" />
+	</cvList>
+	<fileDescription>
+		<fileContent>
+			<cvParam cvRef="MS" accession="MS:1000579" name="MS1 spectrum" value="" />
+			<cvParam cvRef="MS" accession="MS:1000128" name="profile spectrum" value="" />
+			<cvParam cvRef="IMS" accession="IMS:1000080" name="universally unique identifier" value="{6CA61EE8-F100-401D-ABEA-0F34970DF802}" />
+			<cvParam cvRef="IMS" accession="IMS:1000091" name="ibd SHA-1" value="DA249749B3777448F38B3FF06498B6144E1526EF" />
+			<cvParam cvRef="IMS" accession="IMS:1000030" name="continuous" value="" />
+		</fileContent>
+	</fileDescription>
+	<referenceableParamGroupList count="4">
+		<referenceableParamGroup id="spectrum1">
+			<cvParam cvRef="MS" accession="MS:1000579" name="MS1 spectrum" value="" />
+			<cvParam cvRef="MS" accession="MS:1000511" name="ms level" value="0" />
+			<cvParam cvRef="MS" accession="MS:1000128" name="profile spectrum" value="" />
+		</referenceableParamGroup>
+		<referenceableParamGroup id="scan1">
+			<cvParam cvRef="MS" accession="MS:1000093" name="increasing m/z scan" value="" />
+			<cvParam cvRef="MS" accession="MS:1000095" name="linear" value="" />
+		</referenceableParamGroup>
+		<referenceableParamGroup id="mzArray">
+			<cvParam cvRef="MS" accession="MS:1000576" name="no compression" value="" />
+			<cvParam cvRef="MS" accession="MS:1000514" name="m/z array" value="" unitCvRef="MS" unitAccession="MS:1000040" unitName="m/z" />
+			<cvParam cvRef="IMS" accession="IMS:1000101" name="external data" value="true" />
+			<cvParam cvRef="MS" accession="MS:1000521" name="32-bit float" value="32-bit float" />
+		</referenceableParamGroup>
+		<referenceableParamGroup id="intensityArray">
+			<cvParam cvRef="MS" accession="MS:1000576" name="no compression" value="" />
+			<cvParam cvRef="MS" accession="MS:1000515" name="intensity array" value="" unitCvRef="MS" unitAccession="MS:1000131" unitName="number of counts" />
+			<cvParam cvRef="IMS" accession="IMS:1000101" name="external data" value="true" />
+			<cvParam cvRef="MS" accession="MS:1000521" name="32-bit float" value="32-bit float" />
+		</referenceableParamGroup>
+	</referenceableParamGroupList>
+	<sampleList count="1">
+		<sample id="sample1" name="Sample1">
+			<cvParam cvRef="MS" accession="MS:1000001" name="sample number" value="1" />
+		</sample>
+	</sampleList>
+	<softwareList count="1">
+		<software id="Cardinal" version="1.12.1">
+			<cvParam cvRef="MS" accession="MS:1000799" name="custom unreleased software tool" value="" />
+		</software>
+	</softwareList>
+	<scanSettingsList count="1">
+		<scanSettings id="scansettings1">
+			<cvParam cvRef="IMS" accession="IMS:1000042" name="max count of pixel x" value="9" />
+			<cvParam cvRef="IMS" accession="IMS:1000043" name="max count of pixel y" value="3" />
+		</scanSettings>
+	</scanSettingsList>
+	<instrumentConfigurationList count="1">
+		<instrumentConfiguration id="IC1" />
+	</instrumentConfigurationList>
+	<dataProcessingList count="1">
+		<dataProcessing id="CardinalWriteImzML">
+			<processingMethod order="1" softwareRef="Cardinal">
+				<cvParam cvRef="MS" accession="MS:1000544" name="Conversion to mzML" value="" />
+			</processingMethod>
+		</dataProcessing>
+	</dataProcessingList>
+	<run defaultInstrumentConfigurationRef="IC1" id="Experiment01" sampleRef="sample1">
+		<spectrumList count="12" defaultDataProcessingRef="CardinalWriteImzML">
+			<spectrum id="Spectrum=1" defaultArrayLength="0" index="1">
+				<referenceableParamGroupRef ref="spectrum1" />
+				<scanList count="1">
+					<cvParam cvRef="MS" accession="MS:1000795" name="no combination" value="" />
+					<scan instrumentConfigurationRef="IC1">
+						<referenceableParamGroupRef ref="scan1" />
+						<cvParam cvRef="IMS" accession="IMS:1000050" name="position x" value="1" />
+						<cvParam cvRef="IMS" accession="IMS:1000051" name="position y" value="1" />
+					</scan>
+				</scanList>
+				<binaryDataArrayList count="2">
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="mzArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="16" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="8399" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="33596" />
+						<binary />
+					</binaryDataArray>
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="intensityArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="33612" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="8399" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="33596" />
+						<binary />
+					</binaryDataArray>
+				</binaryDataArrayList>
+			</spectrum>
+			<spectrum id="Spectrum=2" defaultArrayLength="0" index="2">
+				<referenceableParamGroupRef ref="spectrum1" />
+				<scanList count="1">
+					<cvParam cvRef="MS" accession="MS:1000795" name="no combination" value="" />
+					<scan instrumentConfigurationRef="IC1">
+						<referenceableParamGroupRef ref="scan1" />
+						<cvParam cvRef="IMS" accession="IMS:1000050" name="position x" value="1" />
+						<cvParam cvRef="IMS" accession="IMS:1000051" name="position y" value="2" />
+					</scan>
+				</scanList>
+				<binaryDataArrayList count="2">
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="mzArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="16" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="8399" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="33596" />
+						<binary />
+					</binaryDataArray>
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="intensityArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="67208" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="8399" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="33596" />
+						<binary />
+					</binaryDataArray>
+				</binaryDataArrayList>
+			</spectrum>
+			<spectrum id="Spectrum=3" defaultArrayLength="0" index="3">
+				<referenceableParamGroupRef ref="spectrum1" />
+				<scanList count="1">
+					<cvParam cvRef="MS" accession="MS:1000795" name="no combination" value="" />
+					<scan instrumentConfigurationRef="IC1">
+						<referenceableParamGroupRef ref="scan1" />
+						<cvParam cvRef="IMS" accession="IMS:1000050" name="position x" value="1" />
+						<cvParam cvRef="IMS" accession="IMS:1000051" name="position y" value="3" />
+					</scan>
+				</scanList>
+				<binaryDataArrayList count="2">
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="mzArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="16" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="8399" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="33596" />
+						<binary />
+					</binaryDataArray>
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="intensityArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="100804" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="8399" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="33596" />
+						<binary />
+					</binaryDataArray>
+				</binaryDataArrayList>
+			</spectrum>
+			<spectrum id="Spectrum=4" defaultArrayLength="0" index="4">
+				<referenceableParamGroupRef ref="spectrum1" />
+				<scanList count="1">
+					<cvParam cvRef="MS" accession="MS:1000795" name="no combination" value="" />
+					<scan instrumentConfigurationRef="IC1">
+						<referenceableParamGroupRef ref="scan1" />
+						<cvParam cvRef="IMS" accession="IMS:1000050" name="position x" value="3" />
+						<cvParam cvRef="IMS" accession="IMS:1000051" name="position y" value="1" />
+					</scan>
+				</scanList>
+				<binaryDataArrayList count="2">
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="mzArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="16" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="8399" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="33596" />
+						<binary />
+					</binaryDataArray>
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="intensityArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="134400" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="8399" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="33596" />
+						<binary />
+					</binaryDataArray>
+				</binaryDataArrayList>
+			</spectrum>
+			<spectrum id="Spectrum=5" defaultArrayLength="0" index="5">
+				<referenceableParamGroupRef ref="spectrum1" />
+				<scanList count="1">
+					<cvParam cvRef="MS" accession="MS:1000795" name="no combination" value="" />
+					<scan instrumentConfigurationRef="IC1">
+						<referenceableParamGroupRef ref="scan1" />
+						<cvParam cvRef="IMS" accession="IMS:1000050" name="position x" value="4" />
+						<cvParam cvRef="IMS" accession="IMS:1000051" name="position y" value="1" />
+					</scan>
+				</scanList>
+				<binaryDataArrayList count="2">
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="mzArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="16" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="8399" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="33596" />
+						<binary />
+					</binaryDataArray>
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="intensityArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="167996" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="8399" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="33596" />
+						<binary />
+					</binaryDataArray>
+				</binaryDataArrayList>
+			</spectrum>
+			<spectrum id="Spectrum=6" defaultArrayLength="0" index="6">
+				<referenceableParamGroupRef ref="spectrum1" />
+				<scanList count="1">
+					<cvParam cvRef="MS" accession="MS:1000795" name="no combination" value="" />
+					<scan instrumentConfigurationRef="IC1">
+						<referenceableParamGroupRef ref="scan1" />
+						<cvParam cvRef="IMS" accession="IMS:1000050" name="position x" value="3" />
+						<cvParam cvRef="IMS" accession="IMS:1000051" name="position y" value="2" />
+					</scan>
+				</scanList>
+				<binaryDataArrayList count="2">
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="mzArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="16" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="8399" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="33596" />
+						<binary />
+					</binaryDataArray>
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="intensityArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="201592" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="8399" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="33596" />
+						<binary />
+					</binaryDataArray>
+				</binaryDataArrayList>
+			</spectrum>
+			<spectrum id="Spectrum=7" defaultArrayLength="0" index="7">
+				<referenceableParamGroupRef ref="spectrum1" />
+				<scanList count="1">
+					<cvParam cvRef="MS" accession="MS:1000795" name="no combination" value="" />
+					<scan instrumentConfigurationRef="IC1">
+						<referenceableParamGroupRef ref="scan1" />
+						<cvParam cvRef="IMS" accession="IMS:1000050" name="position x" value="4" />
+						<cvParam cvRef="IMS" accession="IMS:1000051" name="position y" value="2" />
+					</scan>
+				</scanList>
+				<binaryDataArrayList count="2">
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="mzArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="16" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="8399" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="33596" />
+						<binary />
+					</binaryDataArray>
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="intensityArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="235188" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="8399" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="33596" />
+						<binary />
+					</binaryDataArray>
+				</binaryDataArrayList>
+			</spectrum>
+			<spectrum id="Spectrum=8" defaultArrayLength="0" index="8">
+				<referenceableParamGroupRef ref="spectrum1" />
+				<scanList count="1">
+					<cvParam cvRef="MS" accession="MS:1000795" name="no combination" value="" />
+					<scan instrumentConfigurationRef="IC1">
+						<referenceableParamGroupRef ref="scan1" />
+						<cvParam cvRef="IMS" accession="IMS:1000050" name="position x" value="3" />
+						<cvParam cvRef="IMS" accession="IMS:1000051" name="position y" value="3" />
+					</scan>
+				</scanList>
+				<binaryDataArrayList count="2">
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="mzArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="16" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="8399" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="33596" />
+						<binary />
+					</binaryDataArray>
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="intensityArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="268784" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="8399" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="33596" />
+						<binary />
+					</binaryDataArray>
+				</binaryDataArrayList>
+			</spectrum>
+			<spectrum id="Spectrum=9" defaultArrayLength="0" index="9">
+				<referenceableParamGroupRef ref="spectrum1" />
+				<scanList count="1">
+					<cvParam cvRef="MS" accession="MS:1000795" name="no combination" value="" />
+					<scan instrumentConfigurationRef="IC1">
+						<referenceableParamGroupRef ref="scan1" />
+						<cvParam cvRef="IMS" accession="IMS:1000050" name="position x" value="4" />
+						<cvParam cvRef="IMS" accession="IMS:1000051" name="position y" value="3" />
+					</scan>
+				</scanList>
+				<binaryDataArrayList count="2">
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="mzArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="16" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="8399" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="33596" />
+						<binary />
+					</binaryDataArray>
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="intensityArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="302380" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="8399" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="33596" />
+						<binary />
+					</binaryDataArray>
+				</binaryDataArrayList>
+			</spectrum>
+			<spectrum id="Spectrum=10" defaultArrayLength="0" index="10">
+				<referenceableParamGroupRef ref="spectrum1" />
+				<scanList count="1">
+					<cvParam cvRef="MS" accession="MS:1000795" name="no combination" value="" />
+					<scan instrumentConfigurationRef="IC1">
+						<referenceableParamGroupRef ref="scan1" />
+						<cvParam cvRef="IMS" accession="IMS:1000050" name="position x" value="9" />
+						<cvParam cvRef="IMS" accession="IMS:1000051" name="position y" value="1" />
+					</scan>
+				</scanList>
+				<binaryDataArrayList count="2">
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="mzArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="16" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="8399" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="33596" />
+						<binary />
+					</binaryDataArray>
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="intensityArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="335976" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="8399" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="33596" />
+						<binary />
+					</binaryDataArray>
+				</binaryDataArrayList>
+			</spectrum>
+			<spectrum id="Spectrum=11" defaultArrayLength="0" index="11">
+				<referenceableParamGroupRef ref="spectrum1" />
+				<scanList count="1">
+					<cvParam cvRef="MS" accession="MS:1000795" name="no combination" value="" />
+					<scan instrumentConfigurationRef="IC1">
+						<referenceableParamGroupRef ref="scan1" />
+						<cvParam cvRef="IMS" accession="IMS:1000050" name="position x" value="9" />
+						<cvParam cvRef="IMS" accession="IMS:1000051" name="position y" value="2" />
+					</scan>
+				</scanList>
+				<binaryDataArrayList count="2">
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="mzArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="16" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="8399" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="33596" />
+						<binary />
+					</binaryDataArray>
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="intensityArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="369572" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="8399" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="33596" />
+						<binary />
+					</binaryDataArray>
+				</binaryDataArrayList>
+			</spectrum>
+			<spectrum id="Spectrum=12" defaultArrayLength="0" index="12">
+				<referenceableParamGroupRef ref="spectrum1" />
+				<scanList count="1">
+					<cvParam cvRef="MS" accession="MS:1000795" name="no combination" value="" />
+					<scan instrumentConfigurationRef="IC1">
+						<referenceableParamGroupRef ref="scan1" />
+						<cvParam cvRef="IMS" accession="IMS:1000050" name="position x" value="9" />
+						<cvParam cvRef="IMS" accession="IMS:1000051" name="position y" value="3" />
+					</scan>
+				</scanList>
+				<binaryDataArrayList count="2">
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="mzArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="16" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="8399" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="33596" />
+						<binary />
+					</binaryDataArray>
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="intensityArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="403168" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="8399" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="33596" />
+						<binary />
+					</binaryDataArray>
+				</binaryDataArrayList>
+			</spectrum>
+		</spectrumList>
+	</run>
+</mzML>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/123_auto_combined.imzml.txt	Fri Feb 15 10:21:09 2019 -0500
@@ -0,0 +1,4 @@
+imzML file:
+total 556
+-rw-r--r-- 1 meli meli 537552 Feb 12 12:25 ibd
+-rw-r--r-- 1 meli meli  25466 Feb 12 12:25 imzml
Binary file test-data/123_combined.RData has changed
Binary file test-data/123_combined_QC.pdf has changed
Binary file test-data/123_combined_auto.ibd has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/123_combined_auto.imzml	Fri Feb 15 10:21:09 2019 -0500
@@ -0,0 +1,394 @@
+<?xml version="1.0"?>
+<mzML version="1.1" xmlns="http://psi.hupo.org/ms/mzml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://psi.hupo.org/ms/mzml http://psidev.info/files/ms/mzML/xsd/mzML1.1.0_idx.xsd">
+	<cvList count="3">
+		<cv id="MS" fullName="Proteomics Standards Initiative Mass Spectrometry Ontology" version="1.3.1" URI="http://psidev.info/ms/mzML/psi-ms.obo" />
+		<cv id="UO" fullName="Unit Ontology" version="1.15" URI="http://obo.cvs.sourceforge.net/obo/obo/ontology/phenotype/unit.obo" />
+		<cv id="IMS" fullName="Imaging MS Ontology" version="0.9.1" URI="http://www.maldi-msi.org/download/imzml/imagingMS.obo" />
+	</cvList>
+	<fileDescription>
+		<fileContent>
+			<cvParam cvRef="MS" accession="MS:1000579" name="MS1 spectrum" value="" />
+			<cvParam cvRef="MS" accession="MS:1000128" name="profile spectrum" value="" />
+			<cvParam cvRef="IMS" accession="IMS:1000080" name="universally unique identifier" value="{7DC9B0BB-277B-4A92-8780-2879E0E6A8F2}" />
+			<cvParam cvRef="IMS" accession="IMS:1000091" name="ibd SHA-1" value="6768CFB740661C3F0C560438B85A906EA05933D5" />
+			<cvParam cvRef="IMS" accession="IMS:1000030" name="continuous" value="" />
+		</fileContent>
+	</fileDescription>
+	<referenceableParamGroupList count="4">
+		<referenceableParamGroup id="spectrum1">
+			<cvParam cvRef="MS" accession="MS:1000579" name="MS1 spectrum" value="" />
+			<cvParam cvRef="MS" accession="MS:1000511" name="ms level" value="0" />
+			<cvParam cvRef="MS" accession="MS:1000128" name="profile spectrum" value="" />
+		</referenceableParamGroup>
+		<referenceableParamGroup id="scan1">
+			<cvParam cvRef="MS" accession="MS:1000093" name="increasing m/z scan" value="" />
+			<cvParam cvRef="MS" accession="MS:1000095" name="linear" value="" />
+		</referenceableParamGroup>
+		<referenceableParamGroup id="mzArray">
+			<cvParam cvRef="MS" accession="MS:1000576" name="no compression" value="" />
+			<cvParam cvRef="MS" accession="MS:1000514" name="m/z array" value="" unitCvRef="MS" unitAccession="MS:1000040" unitName="m/z" />
+			<cvParam cvRef="IMS" accession="IMS:1000101" name="external data" value="true" />
+			<cvParam cvRef="MS" accession="MS:1000521" name="32-bit float" value="32-bit float" />
+		</referenceableParamGroup>
+		<referenceableParamGroup id="intensityArray">
+			<cvParam cvRef="MS" accession="MS:1000576" name="no compression" value="" />
+			<cvParam cvRef="MS" accession="MS:1000515" name="intensity array" value="" unitCvRef="MS" unitAccession="MS:1000131" unitName="number of counts" />
+			<cvParam cvRef="IMS" accession="IMS:1000101" name="external data" value="true" />
+			<cvParam cvRef="MS" accession="MS:1000521" name="32-bit float" value="32-bit float" />
+		</referenceableParamGroup>
+	</referenceableParamGroupList>
+	<sampleList count="1">
+		<sample id="sample1" name="Sample1">
+			<cvParam cvRef="MS" accession="MS:1000001" name="sample number" value="1" />
+		</sample>
+	</sampleList>
+	<softwareList count="1">
+		<software id="Cardinal" version="1.12.1">
+			<cvParam cvRef="MS" accession="MS:1000799" name="custom unreleased software tool" value="" />
+		</software>
+	</softwareList>
+	<scanSettingsList count="1">
+		<scanSettings id="scansettings1">
+			<cvParam cvRef="IMS" accession="IMS:1000042" name="max count of pixel x" value="8" />
+			<cvParam cvRef="IMS" accession="IMS:1000043" name="max count of pixel y" value="11" />
+		</scanSettings>
+	</scanSettingsList>
+	<instrumentConfigurationList count="1">
+		<instrumentConfiguration id="IC1" />
+	</instrumentConfigurationList>
+	<dataProcessingList count="1">
+		<dataProcessing id="CardinalWriteImzML">
+			<processingMethod order="1" softwareRef="Cardinal">
+				<cvParam cvRef="MS" accession="MS:1000544" name="Conversion to mzML" value="" />
+			</processingMethod>
+		</dataProcessing>
+	</dataProcessingList>
+	<run defaultInstrumentConfigurationRef="IC1" id="Experiment01" sampleRef="sample1">
+		<spectrumList count="12" defaultDataProcessingRef="CardinalWriteImzML">
+			<spectrum id="Spectrum=1" defaultArrayLength="0" index="1">
+				<referenceableParamGroupRef ref="spectrum1" />
+				<scanList count="1">
+					<cvParam cvRef="MS" accession="MS:1000795" name="no combination" value="" />
+					<scan instrumentConfigurationRef="IC1">
+						<referenceableParamGroupRef ref="scan1" />
+						<cvParam cvRef="IMS" accession="IMS:1000050" name="position x" value="1" />
+						<cvParam cvRef="IMS" accession="IMS:1000051" name="position y" value="1" />
+					</scan>
+				</scanList>
+				<binaryDataArrayList count="2">
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="mzArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="16" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="8399" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="33596" />
+						<binary />
+					</binaryDataArray>
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="intensityArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="33612" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="8399" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="33596" />
+						<binary />
+					</binaryDataArray>
+				</binaryDataArrayList>
+			</spectrum>
+			<spectrum id="Spectrum=2" defaultArrayLength="0" index="2">
+				<referenceableParamGroupRef ref="spectrum1" />
+				<scanList count="1">
+					<cvParam cvRef="MS" accession="MS:1000795" name="no combination" value="" />
+					<scan instrumentConfigurationRef="IC1">
+						<referenceableParamGroupRef ref="scan1" />
+						<cvParam cvRef="IMS" accession="IMS:1000050" name="position x" value="1" />
+						<cvParam cvRef="IMS" accession="IMS:1000051" name="position y" value="2" />
+					</scan>
+				</scanList>
+				<binaryDataArrayList count="2">
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="mzArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="16" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="8399" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="33596" />
+						<binary />
+					</binaryDataArray>
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="intensityArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="67208" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="8399" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="33596" />
+						<binary />
+					</binaryDataArray>
+				</binaryDataArrayList>
+			</spectrum>
+			<spectrum id="Spectrum=3" defaultArrayLength="0" index="3">
+				<referenceableParamGroupRef ref="spectrum1" />
+				<scanList count="1">
+					<cvParam cvRef="MS" accession="MS:1000795" name="no combination" value="" />
+					<scan instrumentConfigurationRef="IC1">
+						<referenceableParamGroupRef ref="scan1" />
+						<cvParam cvRef="IMS" accession="IMS:1000050" name="position x" value="1" />
+						<cvParam cvRef="IMS" accession="IMS:1000051" name="position y" value="3" />
+					</scan>
+				</scanList>
+				<binaryDataArrayList count="2">
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="mzArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="16" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="8399" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="33596" />
+						<binary />
+					</binaryDataArray>
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="intensityArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="100804" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="8399" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="33596" />
+						<binary />
+					</binaryDataArray>
+				</binaryDataArrayList>
+			</spectrum>
+			<spectrum id="Spectrum=4" defaultArrayLength="0" index="4">
+				<referenceableParamGroupRef ref="spectrum1" />
+				<scanList count="1">
+					<cvParam cvRef="MS" accession="MS:1000795" name="no combination" value="" />
+					<scan instrumentConfigurationRef="IC1">
+						<referenceableParamGroupRef ref="scan1" />
+						<cvParam cvRef="IMS" accession="IMS:1000050" name="position x" value="7" />
+						<cvParam cvRef="IMS" accession="IMS:1000051" name="position y" value="1" />
+					</scan>
+				</scanList>
+				<binaryDataArrayList count="2">
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="mzArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="16" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="8399" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="33596" />
+						<binary />
+					</binaryDataArray>
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="intensityArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="134400" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="8399" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="33596" />
+						<binary />
+					</binaryDataArray>
+				</binaryDataArrayList>
+			</spectrum>
+			<spectrum id="Spectrum=5" defaultArrayLength="0" index="5">
+				<referenceableParamGroupRef ref="spectrum1" />
+				<scanList count="1">
+					<cvParam cvRef="MS" accession="MS:1000795" name="no combination" value="" />
+					<scan instrumentConfigurationRef="IC1">
+						<referenceableParamGroupRef ref="scan1" />
+						<cvParam cvRef="IMS" accession="IMS:1000050" name="position x" value="8" />
+						<cvParam cvRef="IMS" accession="IMS:1000051" name="position y" value="1" />
+					</scan>
+				</scanList>
+				<binaryDataArrayList count="2">
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="mzArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="16" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="8399" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="33596" />
+						<binary />
+					</binaryDataArray>
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="intensityArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="167996" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="8399" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="33596" />
+						<binary />
+					</binaryDataArray>
+				</binaryDataArrayList>
+			</spectrum>
+			<spectrum id="Spectrum=6" defaultArrayLength="0" index="6">
+				<referenceableParamGroupRef ref="spectrum1" />
+				<scanList count="1">
+					<cvParam cvRef="MS" accession="MS:1000795" name="no combination" value="" />
+					<scan instrumentConfigurationRef="IC1">
+						<referenceableParamGroupRef ref="scan1" />
+						<cvParam cvRef="IMS" accession="IMS:1000050" name="position x" value="7" />
+						<cvParam cvRef="IMS" accession="IMS:1000051" name="position y" value="2" />
+					</scan>
+				</scanList>
+				<binaryDataArrayList count="2">
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="mzArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="16" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="8399" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="33596" />
+						<binary />
+					</binaryDataArray>
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="intensityArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="201592" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="8399" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="33596" />
+						<binary />
+					</binaryDataArray>
+				</binaryDataArrayList>
+			</spectrum>
+			<spectrum id="Spectrum=7" defaultArrayLength="0" index="7">
+				<referenceableParamGroupRef ref="spectrum1" />
+				<scanList count="1">
+					<cvParam cvRef="MS" accession="MS:1000795" name="no combination" value="" />
+					<scan instrumentConfigurationRef="IC1">
+						<referenceableParamGroupRef ref="scan1" />
+						<cvParam cvRef="IMS" accession="IMS:1000050" name="position x" value="8" />
+						<cvParam cvRef="IMS" accession="IMS:1000051" name="position y" value="2" />
+					</scan>
+				</scanList>
+				<binaryDataArrayList count="2">
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="mzArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="16" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="8399" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="33596" />
+						<binary />
+					</binaryDataArray>
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="intensityArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="235188" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="8399" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="33596" />
+						<binary />
+					</binaryDataArray>
+				</binaryDataArrayList>
+			</spectrum>
+			<spectrum id="Spectrum=8" defaultArrayLength="0" index="8">
+				<referenceableParamGroupRef ref="spectrum1" />
+				<scanList count="1">
+					<cvParam cvRef="MS" accession="MS:1000795" name="no combination" value="" />
+					<scan instrumentConfigurationRef="IC1">
+						<referenceableParamGroupRef ref="scan1" />
+						<cvParam cvRef="IMS" accession="IMS:1000050" name="position x" value="7" />
+						<cvParam cvRef="IMS" accession="IMS:1000051" name="position y" value="3" />
+					</scan>
+				</scanList>
+				<binaryDataArrayList count="2">
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="mzArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="16" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="8399" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="33596" />
+						<binary />
+					</binaryDataArray>
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="intensityArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="268784" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="8399" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="33596" />
+						<binary />
+					</binaryDataArray>
+				</binaryDataArrayList>
+			</spectrum>
+			<spectrum id="Spectrum=9" defaultArrayLength="0" index="9">
+				<referenceableParamGroupRef ref="spectrum1" />
+				<scanList count="1">
+					<cvParam cvRef="MS" accession="MS:1000795" name="no combination" value="" />
+					<scan instrumentConfigurationRef="IC1">
+						<referenceableParamGroupRef ref="scan1" />
+						<cvParam cvRef="IMS" accession="IMS:1000050" name="position x" value="8" />
+						<cvParam cvRef="IMS" accession="IMS:1000051" name="position y" value="3" />
+					</scan>
+				</scanList>
+				<binaryDataArrayList count="2">
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="mzArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="16" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="8399" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="33596" />
+						<binary />
+					</binaryDataArray>
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="intensityArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="302380" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="8399" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="33596" />
+						<binary />
+					</binaryDataArray>
+				</binaryDataArrayList>
+			</spectrum>
+			<spectrum id="Spectrum=10" defaultArrayLength="0" index="10">
+				<referenceableParamGroupRef ref="spectrum1" />
+				<scanList count="1">
+					<cvParam cvRef="MS" accession="MS:1000795" name="no combination" value="" />
+					<scan instrumentConfigurationRef="IC1">
+						<referenceableParamGroupRef ref="scan1" />
+						<cvParam cvRef="IMS" accession="IMS:1000050" name="position x" value="1" />
+						<cvParam cvRef="IMS" accession="IMS:1000051" name="position y" value="9" />
+					</scan>
+				</scanList>
+				<binaryDataArrayList count="2">
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="mzArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="16" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="8399" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="33596" />
+						<binary />
+					</binaryDataArray>
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="intensityArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="335976" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="8399" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="33596" />
+						<binary />
+					</binaryDataArray>
+				</binaryDataArrayList>
+			</spectrum>
+			<spectrum id="Spectrum=11" defaultArrayLength="0" index="11">
+				<referenceableParamGroupRef ref="spectrum1" />
+				<scanList count="1">
+					<cvParam cvRef="MS" accession="MS:1000795" name="no combination" value="" />
+					<scan instrumentConfigurationRef="IC1">
+						<referenceableParamGroupRef ref="scan1" />
+						<cvParam cvRef="IMS" accession="IMS:1000050" name="position x" value="1" />
+						<cvParam cvRef="IMS" accession="IMS:1000051" name="position y" value="10" />
+					</scan>
+				</scanList>
+				<binaryDataArrayList count="2">
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="mzArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="16" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="8399" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="33596" />
+						<binary />
+					</binaryDataArray>
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="intensityArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="369572" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="8399" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="33596" />
+						<binary />
+					</binaryDataArray>
+				</binaryDataArrayList>
+			</spectrum>
+			<spectrum id="Spectrum=12" defaultArrayLength="0" index="12">
+				<referenceableParamGroupRef ref="spectrum1" />
+				<scanList count="1">
+					<cvParam cvRef="MS" accession="MS:1000795" name="no combination" value="" />
+					<scan instrumentConfigurationRef="IC1">
+						<referenceableParamGroupRef ref="scan1" />
+						<cvParam cvRef="IMS" accession="IMS:1000050" name="position x" value="1" />
+						<cvParam cvRef="IMS" accession="IMS:1000051" name="position y" value="11" />
+					</scan>
+				</scanList>
+				<binaryDataArrayList count="2">
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="mzArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="16" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="8399" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="33596" />
+						<binary />
+					</binaryDataArray>
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="intensityArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="403168" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="8399" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="33596" />
+						<binary />
+					</binaryDataArray>
+				</binaryDataArrayList>
+			</spectrum>
+		</spectrumList>
+	</run>
+</mzML>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/123_combined_auto.imzml.txt	Fri Feb 15 10:21:09 2019 -0500
@@ -0,0 +1,4 @@
+imzML file:
+total 452
+-rw-r--r-- 1 meli meli 436764 Feb 12 00:51 ibd
+-rw-r--r-- 1 meli meli  21166 Feb 12 00:51 imzml
Binary file test-data/123_combined_auto.pdf has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/123_combined_auto.tabular	Fri Feb 15 10:21:09 2019 -0500
@@ -0,0 +1,13 @@
+x	y	sample_name
+1	1	msidata_1.RData
+1	2	msidata_1.RData
+1	3	msidata_1.RData
+7	1	msidata_2.RData
+8	1	msidata_2.RData
+7	2	msidata_2.RData
+8	2	msidata_2.RData
+7	3	msidata_2.RData
+8	3	msidata_2.RData
+1	9	msidata_3.RData
+1	10	msidata_3.RData
+1	11	msidata_3.RData
Binary file test-data/12_combined.RData has changed
Binary file test-data/12_combined_QC.pdf has changed
Binary file test-data/2123_auto_combined.RData has changed
Binary file test-data/2123_auto_combined_QC.pdf has changed
Binary file test-data/Plot_empty_spectra.pdf has changed
Binary file test-data/QC_analyze75.pdf has changed
Binary file test-data/QC_empty_spectra.pdf has changed
Binary file test-data/QC_imzml.pdf has changed
Binary file test-data/QC_rdata.pdf has changed
Binary file test-data/analyze75_filtered2.pdf has changed
Binary file test-data/analyze_filtered.RData has changed
Binary file test-data/analyze_filtered.pdf has changed
Binary file test-data/analyze_filteredoutside.RData has changed
Binary file test-data/analyze_originaloutput.RData has changed
Binary file test-data/analyze_originaloutput2.RData has changed
Binary file test-data/centroids_rdata.pdf has changed
Binary file test-data/cluster_skm.RData has changed
--- a/test-data/features_test2.tabular	Thu Oct 25 07:28:42 2018 -0400
+++ b/test-data/features_test2.tabular	Fri Feb 15 10:21:09 2019 -0500
@@ -1,101 +1,101 @@
 mz	ncomp	column	coefficients	loadings	weights
-938.823120117188	2	A	0.00557062672565914	0.0521481794011343	0.0618954239030616
-938.859741210938	2	A	0.00542130109915229	0.0573197814782043	0.0556644462038001
-952.817016601562	2	A	0.00540658997062797	0.0541785607809472	0.0556957101293819
-980.9658203125	2	A	0.00530572666388636	0.0640830071706491	0.0596133867741965
-948.876525878906	2	A	0.00513396526933383	0.0580901569940297	0.0501389238916535
-926.022705078125	2	A	0.00495042111443777	0.0562851962915777	0.0443394574239625
-964.835876464844	2	A	0.00488062440395858	0.0565204963990886	0.0549598184884737
-982.013427734375	2	A	0.00485621047514792	0.048802383602383	0.0509744856714613
-995.19384765625	2	A	0.00481790774594767	0.0605795860610914	0.0530033855827968
-980.591796875	2	A	0.00471855619365328	0.0571816843146788	0.0534415807414751
-907.976257324219	2	A	0.00469109890013257	0.0610286466128535	0.0524345088122848
-907.0048828125	2	A	0.0046524995163741	0.0496389045323984	0.0487703720171644
-950.238220214844	2	C	0.00463861915222127	-0.0340558630529817	-0.0306112282051999
-995.985229492188	2	A	0.00462557611263778	0.0467967955160554	0.0558164362558804
-921.521667480469	2	A	0.00462412758928141	0.0492116848139342	0.0499849768568264
-915.04345703125	2	A	0.00454006262432388	0.0462339924711474	0.0425994231878204
-929.514953613281	2	A	0.00453623375772606	0.0563841702252104	0.045238258655595
-958.31787109375	2	A	0.00450679164876951	0.0459566089567639	0.0423653141505111
-962.870727539062	2	C	0.00448138616027361	-0.0581767564414316	-0.0599267135196269
-942.412719726562	2	A	0.00446754249696574	0.0526251413421558	0.0499585152758468
-922.065551757812	2	A	0.00446641275611493	0.0495906378625035	0.049953814799021
-918.261596679688	2	C	0.00445234724107087	-0.0158931585724287	-0.014157529428659
-973.64794921875	2	A	0.00445110339749622	0.0395696753622873	0.0372883597985613
-991.993957519531	2	A	0.00443336829341509	0.0440255653751743	0.0502927465261473
-976.332946777344	2	A	0.00437993281099959	0.0492604074600163	0.0448822073186939
-979.582275390625	2	C	0.00437918390295013	-0.0344798097888197	-0.03253979930277
-913.41845703125	2	C	0.00437503486499096	-0.00387925008074657	-0.00438981731141592
-948.619018554688	2	A	0.00426105794044819	0.0371821841057357	0.0429237139078889
-901.330810546875	2	A	0.00425328221665412	0.0552699147993945	0.0482509891289382
-960.278381347656	2	C	0.00423132265179973	-0.0433340796542259	-0.0409361343266309
-992.294921875	2	C	0.00418576359850056	-0.0391910598190591	-0.0342798229241432
-994.967834472656	2	A	0.00417817188823829	0.0383119007479891	0.0476486709797929
-948.471862792969	2	A	0.00417161016294321	0.0380099525316105	0.0408760564074696
-904.237426757812	2	A	0.00417080429266561	0.0475165460962433	0.0430960180049384
-942.852722167969	2	B	0.0041438458930486	-0.0468558588772594	-0.049716939342293
-918.442565917969	2	A	0.00413331124379944	0.0423300908408027	0.0458013372312651
-943.109436035156	2	B	0.00412811549109012	-0.0413767608692901	-0.0472745376109769
-936.5556640625	2	A	0.00411371014807382	0.0407060654246003	0.0414790745602655
-945.054321289062	2	A	0.00408474594381495	0.0481061599030778	0.0422885605529943
-992.595886230469	2	A	0.00408223122742656	0.0369204499600823	0.0410564204257673
-913.310180664062	2	A	0.00407879803557168	0.0498424674382356	0.040014655663535
-910.965698242188	2	C	0.00405962992021169	-0.0382641079076008	-0.0379558138613928
-950.606384277344	2	C	0.00405907592689352	-0.0503005800552258	-0.0564684538983107
-974.020629882812	2	A	0.00404970841392063	0.0453076176593101	0.0358031960147686
-903.770629882812	2	C	0.00403337646658259	-0.0308928430941287	-0.035800455446528
-993.197998046875	2	C	0.00402476056402085	-0.022740013818147	-0.0229211765138961
-955.140930175781	2	A	0.00400392811033344	0.0545303511096986	0.0430366824723547
-923.734497070312	2	A	0.00396875769656089	0.0489283101050371	0.0446083164881897
-943.292846679688	2	C	0.00396229091310485	-0.00589037926949604	-0.0081255927937416
-927.768005371094	2	A	0.00396212785702182	0.0446744368922679	0.0419935555431609
-965.540893554688	2	C	0.00395776036645286	-0.0622321071450148	-0.0629368131896196
-907.508483886719	2	A	0.00394876742672506	0.0338904158180818	0.0315098966370126
-960.019287109375	2	A	0.0039403473862032	0.050776397569013	0.03873623640836
-925.041748046875	2	C	0.0039362983069634	0.00547894918105684	0.00648384039698146
-922.863586425781	2	A	0.00393043741778826	0.0404768313565869	0.0320371152599393
-918.985595703125	2	C	0.00392990559936248	-0.0241976051228088	-0.0173907002587976
-938.054809570312	2	A	0.00392283092987214	0.0433932714795145	0.0415656785679352
-952.300964355469	2	A	0.00391807330597071	0.0539847824089577	0.0526900756993094
-938.896301269531	2	A	0.00390920544867313	0.0432075299467666	0.040884460919137
-918.62353515625	2	A	0.00390598520310851	0.0405436877403175	0.0394150273697351
-940.653686523438	2	A	0.00388205579523716	0.0325670207445315	0.0376845331490984
-918.587341308594	2	A	0.00386025843595639	0.0420256786308284	0.0473925689610602
-944.063293457031	2	C	0.00384447645727029	-0.0108918102769628	-0.00500447372654549
-980.479553222656	2	C	0.00383412917234354	-0.0262635632207469	-0.0305873497852977
-905.854248046875	2	C	0.00382809625193645	-0.0509229481136295	-0.0545129795504416
-942.082763671875	2	A	0.00381273797189762	0.0444743475872274	0.0435604050553623
-934.656066894531	2	C	0.00378297587449155	-0.0394312931297934	-0.0485932573378814
-906.89697265625	2	A	0.00374570932202412	0.0339271553171168	0.0282809191934174
-905.890197753906	2	C	0.00373151556865197	-0.024218298123225	-0.0186657492773445
-948.655822753906	2	C	0.00372441631900937	-0.017476081747813	-0.0110316891494553
-959.908325195312	2	A	0.00371442848581406	0.0342932290876843	0.0310906799107696
-946.192810058594	2	B	0.00369361746355479	-0.038238592789904	-0.0417491451554952
-933.524536132812	2	A	0.00368140176962546	0.0376205271222568	0.0348149137052689
-999.531311035156	2	A	0.0036708372022316	0.0419178472824249	0.0360426545514402
-905.602661132812	2	A	0.00366188804899887	0.0371789230194049	0.0403042300562272
-904.560729980469	2	A	0.00366151022492225	0.0483872255903629	0.0393416043647449
-967.02587890625	2	A	0.00364664009773375	0.0358270208382791	0.0367448112342897
-961.833374023438	2	A	0.00364124181915343	0.0500921543232852	0.0471568448381178
-945.71533203125	2	A	0.00362363829859195	0.038772747366622	0.038929243234765
-994.026245117188	2	B	0.00362302096270583	-0.0278102959641648	-0.035044986078868
-922.138061523438	2	A	0.0036165759251259	0.0396894571745094	0.0338599942728403
-921.920471191406	2	C	0.00361497501678999	-0.0109725715482311	-0.00817330765900041
-996.512939453125	2	C	0.00361344604654759	-0.0240208863758058	-0.0216798334099216
-925.586669921875	2	C	0.00360019116631399	-0.000201285421933851	-0.00370132703005591
-927.076965332031	2	A	0.00359739327950109	0.0402217752115896	0.0381187534803433
-946.266296386719	2	A	0.00359027149639919	0.0350158580852316	0.0345803953604497
-997.644348144531	2	C	0.00358755032912394	-0.0386413413940509	-0.0374227165960138
-986.959838867188	2	C	0.00356886986009821	-0.00770354721402719	-0.0073488017929185
-956.544067382812	2	B	0.00356755616082941	-0.0263554430477736	-0.0341563371597065
-981.826293945312	2	A	0.0035614851177778	0.0318618564397332	0.0359368988957353
-995.683715820312	2	A	0.0035606803581847	0.0326251406575274	0.0326734264590619
-949.575622558594	2	A	0.00354754516564472	0.0399068842159591	0.0381317579086198
-990.565063476562	2	C	0.00354075441437422	-0.00252469837204454	-0.00790021238532976
-970.222473144531	2	A	0.00353702890647679	0.033894961483528	0.0342653656238723
-926.277160644531	2	C	0.00352995388417487	-0.00403664201467942	-0.00483641570245392
-981.15283203125	2	A	0.00352226894457903	0.0343450789571067	0.0416777456263345
-927.222412109375	2	A	0.00350510856591621	0.0346202558912905	0.033535024774141
-946.450012207031	2	A	0.00349425060263787	0.0428865972028226	0.0325784624960938
-979.395385742188	2	C	0.00349405845239093	-0.00985834384583178	-0.00848238004662365
-902.083984375	2	A	0.00349155533954646	0.0283241643148307	0.0297190584575691
+938.823120117188	2	A	0.005571	0.052148	0.061895
+938.859741210938	2	A	0.005421	0.05732	0.055664
+952.817016601562	2	A	0.005407	0.054179	0.055696
+980.9658203125	2	A	0.005306	0.064083	0.059613
+948.876525878906	2	A	0.005134	0.05809	0.050139
+926.022705078125	2	A	0.00495	0.056285	0.044339
+964.835876464844	2	A	0.004881	0.05652	0.05496
+982.013427734375	2	A	0.004856	0.048802	0.050974
+995.19384765625	2	A	0.004818	0.06058	0.053003
+980.591796875	2	A	0.004719	0.057182	0.053442
+907.976257324219	2	A	0.004691	0.061029	0.052435
+907.0048828125	2	A	0.004652	0.049639	0.04877
+950.238220214844	2	C	0.004639	-0.034056	-0.030611
+995.985229492188	2	A	0.004626	0.046797	0.055816
+921.521667480469	2	A	0.004624	0.049212	0.049985
+915.04345703125	2	A	0.00454	0.046234	0.042599
+929.514953613281	2	A	0.004536	0.056384	0.045238
+958.31787109375	2	A	0.004507	0.045957	0.042365
+962.870727539062	2	C	0.004481	-0.058177	-0.059927
+942.412719726562	2	A	0.004468	0.052625	0.049959
+922.065551757812	2	A	0.004466	0.049591	0.049954
+918.261596679688	2	C	0.004452	-0.015893	-0.014158
+973.64794921875	2	A	0.004451	0.03957	0.037288
+991.993957519531	2	A	0.004433	0.044026	0.050293
+976.332946777344	2	A	0.00438	0.04926	0.044882
+979.582275390625	2	C	0.004379	-0.03448	-0.03254
+913.41845703125	2	C	0.004375	-0.003879	-0.00439
+948.619018554688	2	A	0.004261	0.037182	0.042924
+901.330810546875	2	A	0.004253	0.05527	0.048251
+960.278381347656	2	C	0.004231	-0.043334	-0.040936
+992.294921875	2	C	0.004186	-0.039191	-0.03428
+994.967834472656	2	A	0.004178	0.038312	0.047649
+948.471862792969	2	A	0.004172	0.03801	0.040876
+904.237426757812	2	A	0.004171	0.047517	0.043096
+942.852722167969	2	B	0.004144	-0.046856	-0.049717
+918.442565917969	2	A	0.004133	0.04233	0.045801
+943.109436035156	2	B	0.004128	-0.041377	-0.047275
+936.5556640625	2	A	0.004114	0.040706	0.041479
+945.054321289062	2	A	0.004085	0.048106	0.042289
+992.595886230469	2	A	0.004082	0.03692	0.041056
+913.310180664062	2	A	0.004079	0.049842	0.040015
+910.965698242188	2	C	0.00406	-0.038264	-0.037956
+950.606384277344	2	C	0.004059	-0.050301	-0.056468
+974.020629882812	2	A	0.00405	0.045308	0.035803
+903.770629882812	2	C	0.004033	-0.030893	-0.0358
+993.197998046875	2	C	0.004025	-0.02274	-0.022921
+955.140930175781	2	A	0.004004	0.05453	0.043037
+923.734497070312	2	A	0.003969	0.048928	0.044608
+943.292846679688	2	C	0.003962	-0.00589	-0.008126
+927.768005371094	2	A	0.003962	0.044674	0.041994
+965.540893554688	2	C	0.003958	-0.062232	-0.062937
+907.508483886719	2	A	0.003949	0.03389	0.03151
+960.019287109375	2	A	0.00394	0.050776	0.038736
+925.041748046875	2	C	0.003936	0.005479	0.006484
+922.863586425781	2	A	0.00393	0.040477	0.032037
+918.985595703125	2	C	0.00393	-0.024198	-0.017391
+938.054809570312	2	A	0.003923	0.043393	0.041566
+952.300964355469	2	A	0.003918	0.053985	0.05269
+938.896301269531	2	A	0.003909	0.043208	0.040884
+918.62353515625	2	A	0.003906	0.040544	0.039415
+940.653686523438	2	A	0.003882	0.032567	0.037685
+918.587341308594	2	A	0.00386	0.042026	0.047393
+944.063293457031	2	C	0.003844	-0.010892	-0.005004
+980.479553222656	2	C	0.003834	-0.026264	-0.030587
+905.854248046875	2	C	0.003828	-0.050923	-0.054513
+942.082763671875	2	A	0.003813	0.044474	0.04356
+934.656066894531	2	C	0.003783	-0.039431	-0.048593
+906.89697265625	2	A	0.003746	0.033927	0.028281
+905.890197753906	2	C	0.003732	-0.024218	-0.018666
+948.655822753906	2	C	0.003724	-0.017476	-0.011032
+959.908325195312	2	A	0.003714	0.034293	0.031091
+946.192810058594	2	B	0.003694	-0.038239	-0.041749
+933.524536132812	2	A	0.003681	0.037621	0.034815
+999.531311035156	2	A	0.003671	0.041918	0.036043
+905.602661132812	2	A	0.003662	0.037179	0.040304
+904.560729980469	2	A	0.003662	0.048387	0.039342
+967.02587890625	2	A	0.003647	0.035827	0.036745
+961.833374023438	2	A	0.003641	0.050092	0.047157
+945.71533203125	2	A	0.003624	0.038773	0.038929
+994.026245117188	2	B	0.003623	-0.02781	-0.035045
+922.138061523438	2	A	0.003617	0.039689	0.03386
+921.920471191406	2	C	0.003615	-0.010973	-0.008173
+996.512939453125	2	C	0.003613	-0.024021	-0.02168
+925.586669921875	2	C	0.0036	-0.000201	-0.003701
+927.076965332031	2	A	0.003597	0.040222	0.038119
+946.266296386719	2	A	0.00359	0.035016	0.03458
+997.644348144531	2	C	0.003588	-0.038641	-0.037423
+986.959838867188	2	C	0.003569	-0.007704	-0.007349
+956.544067382812	2	B	0.003568	-0.026355	-0.034156
+981.826293945312	2	A	0.003561	0.031862	0.035937
+995.683715820312	2	A	0.003561	0.032625	0.032673
+949.575622558594	2	A	0.003548	0.039907	0.038132
+990.565063476562	2	C	0.003541	-0.002525	-0.0079
+970.222473144531	2	A	0.003537	0.033895	0.034265
+926.277160644531	2	C	0.00353	-0.004037	-0.004836
+981.15283203125	2	A	0.003522	0.034345	0.041678
+927.222412109375	2	A	0.003505	0.03462	0.033535
+946.450012207031	2	A	0.003494	0.042887	0.032578
+979.395385742188	2	C	0.003494	-0.009858	-0.008482
+902.083984375	2	A	0.003492	0.028324	0.029719
--- a/test-data/features_test4.tabular	Thu Oct 25 07:28:42 2018 -0400
+++ b/test-data/features_test4.tabular	Fri Feb 15 10:21:09 2019 -0500
@@ -1,101 +1,101 @@
 mz	ncomp	column	coefficients	loadings	weights
-912.877136230469	3	B	0.00402511569666969	-0.246308032464734	-0.0998747661753797
-928.8232421875	3	A	0.00355204006388532	0.273286934815558	0.288081987978036
-928.859680175781	3	B	0.00304099166534859	-0.180023925015396	-0.0975882865489913
-929.806274414062	3	A	0.00301867966492034	0.20461792386307	0.204104875190971
-928.786865234375	3	A	0.00294246516676733	0.279365597419633	0.24012019090174
-912.913208007812	3	B	0.00221421341476842	-0.25734495461644	-0.123924205177262
-906.357543945312	3	B	0.0017751956946221	0.0660711931225974	-0.167734534471784
-913.887756347656	3	B	0.00169164545723661	-0.0797847981582402	-0.0542158398194389
-907.400573730469	3	A	0.00168976824209188	-0.0553409573032757	-0.0310185392575794
-900.3271484375	3	A	0.0016850771109767	0.0635456830152988	0.0623351620915374
-928.896057128906	3	B	0.00168450000766379	-0.182486440635111	-0.0950023449824687
-922.355712890625	3	A	0.00167096941795371	0.0529977859368994	0.0679949938623556
-900.398864746094	3	A	0.00166100096018687	0.0406827592981194	-0.010027514312194
-960.315368652344	3	A	0.00164686513200881	0.0692239228029656	0.0559857485267436
-964.353698730469	3	A	0.0016007991522707	0.0487859885763137	0.049315043939497
-906.3935546875	3	A	0.00157421991835154	-0.184824638462265	-0.161519730620847
-964.316589355469	3	A	0.00143180642589214	0.0309764043652652	0.0453653991628429
-962.31494140625	3	A	0.00141328760599612	0.0642563963154312	0.0454439922528048
-929.879089355469	3	B	0.00137108902531006	-0.147152863346693	-0.0787919913569194
-900.434692382812	3	B	0.00131488882358473	-0.20214180256976	-0.173026933354479
-901.402526855469	3	A	0.00131071912036092	0.0193425453272541	0.00416556425120399
-922.391967773438	3	A	0.00128195781418033	0.0250080230991378	0.0401690309084914
-915.33251953125	3	A	0.00127720082168308	0.0472700250545067	0.0476142683041524
-938.310852050781	3	A	0.00126979651175339	0.0258332330864995	0.0395551945184375
-913.923889160156	3	B	0.00125913909333928	-0.116366449217641	-0.0823808975691949
-907.508483886719	3	A	0.00123463128203684	0.0286834379044553	0.0416260189187914
-974.356140136719	3	A	0.00122974867070485	0.0426004370460666	0.0327898050985416
-933.451599121094	3	A	0.00122075781571264	0.0189293266454833	0.0363946273679358
-910.352966308594	3	A	0.00121465945239948	0.0212318588989688	0.0191774558940735
-990.339538574219	3	A	0.00120033930835288	0.0471035220902788	0.0441020126132822
-984.41015625	3	A	0.00117709585424916	0.0256612782877473	0.0364785894847815
-922.319458007812	3	A	0.00116343926435404	0.0350575504771194	0.049003566656031
-945.825500488281	3	A	0.00116281366134625	0.0358386234196617	0.039941557361758
-914.429443359375	3	A	0.00114751581370748	0.0214325420152595	0.0322577162355903
-934.364013671875	3	A	0.00111966105461266	0.0261184955739278	0.0277902861913678
-945.788757324219	3	A	0.0011140971316516	0.0602657244502292	0.0678490003014779
-930.27978515625	3	A	0.00111107830564362	0.0548573050563774	0.0541864639681832
-987.41015625	3	A	0.00109109627880292	0.0259022291567729	0.0348827329301489
-917.320922851562	3	B	0.00108811988692458	-0.0380939775497376	-0.0859734761406655
-961.388977050781	3	A	0.00108270610537361	0.0208991144261707	0.0235951714502884
-949.244445800781	3	A	0.00108094226185502	0.0553461544724562	0.0473287208302763
-914.393310546875	3	A	0.00107937289161071	0.0186407876697643	0.0213451871968151
-923.37158203125	3	A	0.00107406087109902	0.0174157121297602	0.0300927241546599
-967.322998046875	3	A	0.00106160501633174	0.0413827618597132	0.0291509896006055
-961.314880371094	3	A	0.00105652394646208	0.0429555520663857	0.0345573512639803
-994.252197265625	3	A	0.00105259315733988	0.0465400676246555	0.0444177569572566
-945.348083496094	3	A	0.00104820825219221	0.00490478080758506	0.00553720261210505
-913.346313476562	3	A	0.00103460925930171	0.0189564108870971	0.026732642281156
-914.321105957031	3	A	0.00103017762730726	0.0282931942786005	0.0284256699648362
-929.442138671875	3	A	0.00102404971565295	0.0229046222354404	0.0276260524235887
-922.42822265625	3	A	0.0010201655110503	0.00439147989742666	0.022483171550914
-978.386474609375	3	A	0.00101071432463861	0.0477124446667881	0.0315232247977375
-939.335510253906	3	A	0.00100997005380696	0.0115288494115123	0.0213424433245233
-929.478515625	3	A	0.00100973338976312	0.0376043223441187	0.0393591980443549
-939.079284667969	3	A	0.00100844892647231	0.031219827705917	0.0442017366717789
-943.843139648438	3	A	0.000998522723296839	0.0267299053728509	0.036566368840497
-929.842712402344	3	A	0.000985861500832982	0.0831947546006432	0.10803783679681
-940.397277832031	3	A	0.000981083898431389	0.0151431322576335	0.0277538495060947
-990.302001953125	3	A	0.000975080019411607	0.0394636635241222	0.0357960840702764
-913.310180664062	3	A	0.000968769911918236	0.0107823038071007	0.0262423379384436
-912.3359375	3	A	0.000967109425146236	0.0334299345844847	0.0262269905676808
-934.327514648438	3	A	0.000965358942233967	0.0380560763121743	0.0247830327164836
-978.34912109375	3	A	0.000951696141507144	0.0246378024631849	0.0263610910562008
-964.427856445312	3	A	0.000949632779126584	0.0206276476766682	0.0323633524966416
-905.135498046875	3	A	0.000938890795440174	0.0358363374682948	0.0462758721204666
-902.9091796875	3	A	0.000928200839226985	0.0270476983876206	0.0331256977422899
-970.296875	3	A	0.000917937154598045	0.0412888009110875	0.0371046212107984
-900.291320800781	3	A	0.000915554291393151	0.036900837325731	0.0299428712446064
-936.372924804688	3	A	0.00091425261278822	0.0304697260564217	0.0172307486843934
-902.550354003906	3	A	0.000913173677427114	0.0206873082762993	0.0314356257688807
-969.329895019531	3	A	0.00090861890412644	0.0381404597757337	0.0290496620448507
-928.350158691406	3	B	0.000900790180107579	-0.0354285882483893	-0.0781235087794192
-906.465454101562	3	A	0.000894886810510601	0.0278152115913203	0.00415630972695765
-951.195617675781	3	A	0.00088960840060638	0.0213781455200748	0.0390510024922428
-929.296508789062	3	A	0.00088945452659998	0.0574166486840185	0.0407909727744226
-910.389038085938	3	A	0.000888660624855818	0.00883285913101179	0.024080334566073
-900.362976074219	3	A	0.000883637632569096	0.0601212422828572	0.020862039569661
-938.274291992188	3	A	0.000883070665782107	0.0420871600944523	0.0280462808036272
-978.423828125	3	A	0.000872970230052765	0.0296257238522422	0.0297815743118744
-911.326171875	3	A	0.00086789849916482	0.0394187876318227	0.0290756595311376
-931.700927734375	3	A	0.000861266010686886	0.0280254327018276	0.0337516683459626
-974.393371582031	3	A	0.00086077059179462	0.0419836959861716	0.0289479495170414
-948.251220703125	3	A	0.000851477547904384	0.0586205266644055	0.0458040438736673
-930.862670898438	3	B	0.000847409031672241	-0.0301586503036759	-0.0413625782185381
-916.923034667969	3	A	0.000845064368244676	0.0201331942543559	0.0318311721846992
-949.318054199219	3	A	0.000844949051475147	0.0315506908752857	0.0279475612749433
-985.459655761719	3	A	0.000842609316199747	0.0291683495191316	0.0295586583634342
-907.4365234375	3	A	0.000842558751196136	0.0249644273710741	0.0174278577017741
-925.18701171875	3	A	0.000838340515097191	0.0229497739599204	0.0228814357718886
-929.332885742188	3	B	0.000836809726794182	-0.0293672010070615	-0.0547646716148819
-937.506225585938	3	A	0.000833507239635534	0.0178457519825421	0.0278222013471842
-987.335083007812	3	A	0.000833440336912753	0.0308912024371622	0.0275278913639686
-987.372619628906	3	A	0.000826015704761948	0.0386304306725754	0.0226104858957154
-991.392211914062	3	A	0.000822495593430933	0.0301123283528462	0.0258405716069016
-986.359619140625	3	A	0.00081725052418651	0.0222459076819841	0.0214131889306635
-995.608337402344	3	A	0.000815403977582455	0.0244745957678714	0.0372521871817605
-901.438415527344	3	B	0.000811802591576616	-0.14481476191689	-0.105509238222151
-927.295166015625	3	A	0.000809570499146196	0.0324202661433909	0.0195781537578164
-957.467712402344	3	A	0.000805168267772138	0.0349607008493259	0.0294205742236357
-982.387756347656	3	A	0.000802321450704626	0.0296134673806074	0.0240390222467118
+912.877136230469	3	B	0.004025	-0.246308	-0.099875
+928.8232421875	3	A	0.003552	0.273287	0.288082
+928.859680175781	3	B	0.003041	-0.180024	-0.097588
+929.806274414062	3	A	0.003019	0.204618	0.204105
+928.786865234375	3	A	0.002942	0.279366	0.24012
+912.913208007812	3	B	0.002214	-0.257345	-0.123924
+906.357543945312	3	B	0.001775	0.066071	-0.167735
+913.887756347656	3	B	0.001692	-0.079785	-0.054216
+907.400573730469	3	A	0.00169	-0.055341	-0.031019
+900.3271484375	3	A	0.001685	0.063546	0.062335
+928.896057128906	3	B	0.001685	-0.182486	-0.095002
+922.355712890625	3	A	0.001671	0.052998	0.067995
+900.398864746094	3	A	0.001661	0.040683	-0.010028
+960.315368652344	3	A	0.001647	0.069224	0.055986
+964.353698730469	3	A	0.001601	0.048786	0.049315
+906.3935546875	3	A	0.001574	-0.184825	-0.16152
+964.316589355469	3	A	0.001432	0.030976	0.045365
+962.31494140625	3	A	0.001413	0.064256	0.045444
+929.879089355469	3	B	0.001371	-0.147153	-0.078792
+900.434692382812	3	B	0.001315	-0.202142	-0.173027
+901.402526855469	3	A	0.001311	0.019343	0.004166
+922.391967773438	3	A	0.001282	0.025008	0.040169
+915.33251953125	3	A	0.001277	0.04727	0.047614
+938.310852050781	3	A	0.00127	0.025833	0.039555
+913.923889160156	3	B	0.001259	-0.116366	-0.082381
+907.508483886719	3	A	0.001235	0.028683	0.041626
+974.356140136719	3	A	0.00123	0.0426	0.03279
+933.451599121094	3	A	0.001221	0.018929	0.036395
+910.352966308594	3	A	0.001215	0.021232	0.019177
+990.339538574219	3	A	0.0012	0.047104	0.044102
+984.41015625	3	A	0.001177	0.025661	0.036479
+922.319458007812	3	A	0.001163	0.035058	0.049004
+945.825500488281	3	A	0.001163	0.035839	0.039942
+914.429443359375	3	A	0.001148	0.021433	0.032258
+934.364013671875	3	A	0.00112	0.026118	0.02779
+945.788757324219	3	A	0.001114	0.060266	0.067849
+930.27978515625	3	A	0.001111	0.054857	0.054186
+987.41015625	3	A	0.001091	0.025902	0.034883
+917.320922851562	3	B	0.001088	-0.038094	-0.085973
+961.388977050781	3	A	0.001083	0.020899	0.023595
+949.244445800781	3	A	0.001081	0.055346	0.047329
+914.393310546875	3	A	0.001079	0.018641	0.021345
+923.37158203125	3	A	0.001074	0.017416	0.030093
+967.322998046875	3	A	0.001062	0.041383	0.029151
+961.314880371094	3	A	0.001057	0.042956	0.034557
+994.252197265625	3	A	0.001053	0.04654	0.044418
+945.348083496094	3	A	0.001048	0.004905	0.005537
+913.346313476562	3	A	0.001035	0.018956	0.026733
+914.321105957031	3	A	0.00103	0.028293	0.028426
+929.442138671875	3	A	0.001024	0.022905	0.027626
+922.42822265625	3	A	0.00102	0.004391	0.022483
+978.386474609375	3	A	0.001011	0.047712	0.031523
+939.335510253906	3	A	0.00101	0.011529	0.021342
+929.478515625	3	A	0.00101	0.037604	0.039359
+939.079284667969	3	A	0.001008	0.03122	0.044202
+943.843139648438	3	A	0.000999	0.02673	0.036566
+929.842712402344	3	A	0.000986	0.083195	0.108038
+940.397277832031	3	A	0.000981	0.015143	0.027754
+990.302001953125	3	A	0.000975	0.039464	0.035796
+913.310180664062	3	A	0.000969	0.010782	0.026242
+912.3359375	3	A	0.000967	0.03343	0.026227
+934.327514648438	3	A	0.000965	0.038056	0.024783
+978.34912109375	3	A	0.000952	0.024638	0.026361
+964.427856445312	3	A	0.00095	0.020628	0.032363
+905.135498046875	3	A	0.000939	0.035836	0.046276
+902.9091796875	3	A	0.000928	0.027048	0.033126
+970.296875	3	A	0.000918	0.041289	0.037105
+900.291320800781	3	A	0.000916	0.036901	0.029943
+936.372924804688	3	A	0.000914	0.03047	0.017231
+902.550354003906	3	A	0.000913	0.020687	0.031436
+969.329895019531	3	A	0.000909	0.03814	0.02905
+928.350158691406	3	B	0.000901	-0.035429	-0.078124
+906.465454101562	3	A	0.000895	0.027815	0.004156
+951.195617675781	3	A	0.00089	0.021378	0.039051
+929.296508789062	3	A	0.000889	0.057417	0.040791
+910.389038085938	3	A	0.000889	0.008833	0.02408
+900.362976074219	3	A	0.000884	0.060121	0.020862
+938.274291992188	3	A	0.000883	0.042087	0.028046
+978.423828125	3	A	0.000873	0.029626	0.029782
+911.326171875	3	A	0.000868	0.039419	0.029076
+931.700927734375	3	A	0.000861	0.028025	0.033752
+974.393371582031	3	A	0.000861	0.041984	0.028948
+948.251220703125	3	A	0.000851	0.058621	0.045804
+930.862670898438	3	B	0.000847	-0.030159	-0.041363
+916.923034667969	3	A	0.000845	0.020133	0.031831
+949.318054199219	3	A	0.000845	0.031551	0.027948
+985.459655761719	3	A	0.000843	0.029168	0.029559
+907.4365234375	3	A	0.000843	0.024964	0.017428
+925.18701171875	3	A	0.000838	0.02295	0.022881
+929.332885742188	3	B	0.000837	-0.029367	-0.054765
+937.506225585938	3	A	0.000834	0.017846	0.027822
+987.335083007812	3	A	0.000833	0.030891	0.027528
+987.372619628906	3	A	0.000826	0.03863	0.02261
+991.392211914062	3	A	0.000822	0.030112	0.025841
+986.359619140625	3	A	0.000817	0.022246	0.021413
+995.608337402344	3	A	0.000815	0.024475	0.037252
+901.438415527344	3	B	0.000812	-0.144815	-0.105509
+927.295166015625	3	A	0.00081	0.03242	0.019578
+957.467712402344	3	A	0.000805	0.034961	0.029421
+982.387756347656	3	A	0.000802	0.029613	0.024039
--- a/test-data/features_test6.tabular	Thu Oct 25 07:28:42 2018 -0400
+++ b/test-data/features_test6.tabular	Fri Feb 15 10:21:09 2019 -0500
@@ -1,21 +1,21 @@
 mz	r	k	s	classes	centers	tstatistics	p.values	adj.p.values
-928.859680175781	2	3	2	B	43.9516959905118	0.541814677313986	0.607464263577403	1
-912.877136230469	2	3	2	B	55.419364071664	0.437808238568372	0.676846169835776	1
-913.887756347656	2	3	2	B	24.9140214890445	0.393340199810185	0.70766449744142	1
-930.862670898438	2	3	2	B	9.28583084091344	0.29858210475084	0.775329712997245	1
-913.923889160156	2	3	2	B	12.1491837287613	0.0960056413112618	0.926642424678888	1
-900.004699707031	2	3	2	A	2.29166666666667	0	1	1
+928.859680175781	2	3	2	B	43.951696	0.541815	0.607464	1
+912.877136230469	2	3	2	B	55.419364	0.437808	0.676846	1
+913.887756347656	2	3	2	B	24.914021	0.39334	0.707664	1
+930.862670898438	2	3	2	B	9.285831	0.298582	0.77533	1
+913.923889160156	2	3	2	B	12.149184	0.096006	0.926642	1
+900.004699707031	2	3	2	A	2.291667	0	1	1
 900.04052734375	2	3	2	A	3.125	0	1	1
-900.076354980469	2	3	2	A	3.33333333333333	0	1	1
-900.112182617188	2	3	2	A	3.45833333333333	0	1	1
-900.148010253906	2	3	2	A	3.29166666666667	0	1	1
+900.076354980469	2	3	2	A	3.333333	0	1	1
+900.112182617188	2	3	2	A	3.458333	0	1	1
+900.148010253906	2	3	2	A	3.291667	0	1	1
 900.183837890625	2	3	2	A	3.375	0	1	1
-900.219665527344	2	3	2	A	3.66666666666667	0	1	1
-900.255493164062	2	3	2	A	3.91666666666667	0	1	1
-900.291320800781	2	3	2	A	4.08333333333333	0	1	1
-900.3271484375	2	3	2	A	5.79166666666667	0	1	1
-900.362976074219	2	3	2	A	11.5416666666667	0	1	1
-900.398864746094	2	3	2	A	26.2083333333333	0	1	1
-900.434692382812	2	3	2	A	30.0416666666667	0	1	1
-900.470520019531	2	3	2	A	19.1666666666667	0	1	1
+900.219665527344	2	3	2	A	3.666667	0	1	1
+900.255493164062	2	3	2	A	3.916667	0	1	1
+900.291320800781	2	3	2	A	4.083333	0	1	1
+900.3271484375	2	3	2	A	5.791667	0	1	1
+900.362976074219	2	3	2	A	11.541667	0	1	1
+900.398864746094	2	3	2	A	26.208333	0	1	1
+900.434692382812	2	3	2	A	30.041667	0	1	1
+900.470520019531	2	3	2	A	19.166667	0	1	1
 900.50634765625	2	3	2	A	8.5	0	1	1
--- a/test-data/features_test7.tabular	Thu Oct 25 07:28:42 2018 -0400
+++ b/test-data/features_test7.tabular	Fri Feb 15 10:21:09 2019 -0500
@@ -1,101 +1,101 @@
 mz	ncomp	column	coefficients	loadings	weights
-938.823120117188	2	A	0.00557062672565914	0.0521481794011343	0.0618954239030616
-938.859741210938	2	A	0.00542130109915229	0.0573197814782043	0.0556644462038001
-952.817016601562	2	A	0.00540658997062797	0.0541785607809472	0.0556957101293819
-980.9658203125	2	A	0.00530572666388636	0.0640830071706491	0.0596133867741965
-948.876525878906	2	A	0.00513396526933383	0.0580901569940297	0.0501389238916535
-926.022705078125	2	A	0.00495042111443777	0.0562851962915777	0.0443394574239625
-964.835876464844	2	A	0.00488062440395858	0.0565204963990886	0.0549598184884737
-982.013427734375	2	A	0.00485621047514792	0.048802383602383	0.0509744856714613
-995.19384765625	2	A	0.00481790774594767	0.0605795860610914	0.0530033855827968
-980.591796875	2	A	0.00471855619365328	0.0571816843146788	0.0534415807414751
-907.976257324219	2	A	0.00469109890013257	0.0610286466128535	0.0524345088122848
-907.0048828125	2	A	0.0046524995163741	0.0496389045323984	0.0487703720171644
-950.238220214844	2	C	0.00463861915222127	-0.0340558630529817	-0.0306112282051999
-995.985229492188	2	A	0.00462557611263778	0.0467967955160554	0.0558164362558804
-921.521667480469	2	A	0.00462412758928141	0.0492116848139342	0.0499849768568264
-915.04345703125	2	A	0.00454006262432388	0.0462339924711474	0.0425994231878204
-929.514953613281	2	A	0.00453623375772606	0.0563841702252104	0.045238258655595
-958.31787109375	2	A	0.00450679164876951	0.0459566089567639	0.0423653141505111
-962.870727539062	2	C	0.00448138616027361	-0.0581767564414316	-0.0599267135196269
-942.412719726562	2	A	0.00446754249696574	0.0526251413421558	0.0499585152758468
-922.065551757812	2	A	0.00446641275611493	0.0495906378625035	0.049953814799021
-918.261596679688	2	C	0.00445234724107087	-0.0158931585724287	-0.014157529428659
-973.64794921875	2	A	0.00445110339749622	0.0395696753622873	0.0372883597985613
-991.993957519531	2	A	0.00443336829341509	0.0440255653751743	0.0502927465261473
-976.332946777344	2	A	0.00437993281099959	0.0492604074600163	0.0448822073186939
-979.582275390625	2	C	0.00437918390295013	-0.0344798097888197	-0.03253979930277
-913.41845703125	2	C	0.00437503486499096	-0.00387925008074657	-0.00438981731141592
-948.619018554688	2	A	0.00426105794044819	0.0371821841057357	0.0429237139078889
-901.330810546875	2	A	0.00425328221665412	0.0552699147993945	0.0482509891289382
-960.278381347656	2	C	0.00423132265179973	-0.0433340796542259	-0.0409361343266309
-992.294921875	2	C	0.00418576359850056	-0.0391910598190591	-0.0342798229241432
-994.967834472656	2	A	0.00417817188823829	0.0383119007479891	0.0476486709797929
-948.471862792969	2	A	0.00417161016294321	0.0380099525316105	0.0408760564074696
-904.237426757812	2	A	0.00417080429266561	0.0475165460962433	0.0430960180049384
-942.852722167969	2	B	0.0041438458930486	-0.0468558588772594	-0.049716939342293
-918.442565917969	2	A	0.00413331124379944	0.0423300908408027	0.0458013372312651
-943.109436035156	2	B	0.00412811549109012	-0.0413767608692901	-0.0472745376109769
-936.5556640625	2	A	0.00411371014807382	0.0407060654246003	0.0414790745602655
-945.054321289062	2	A	0.00408474594381495	0.0481061599030778	0.0422885605529943
-992.595886230469	2	A	0.00408223122742656	0.0369204499600823	0.0410564204257673
-913.310180664062	2	A	0.00407879803557168	0.0498424674382356	0.040014655663535
-910.965698242188	2	C	0.00405962992021169	-0.0382641079076008	-0.0379558138613928
-950.606384277344	2	C	0.00405907592689352	-0.0503005800552258	-0.0564684538983107
-974.020629882812	2	A	0.00404970841392063	0.0453076176593101	0.0358031960147686
-903.770629882812	2	C	0.00403337646658259	-0.0308928430941287	-0.035800455446528
-993.197998046875	2	C	0.00402476056402085	-0.022740013818147	-0.0229211765138961
-955.140930175781	2	A	0.00400392811033344	0.0545303511096986	0.0430366824723547
-923.734497070312	2	A	0.00396875769656089	0.0489283101050371	0.0446083164881897
-943.292846679688	2	C	0.00396229091310485	-0.00589037926949604	-0.0081255927937416
-927.768005371094	2	A	0.00396212785702182	0.0446744368922679	0.0419935555431609
-965.540893554688	2	C	0.00395776036645286	-0.0622321071450148	-0.0629368131896196
-907.508483886719	2	A	0.00394876742672506	0.0338904158180818	0.0315098966370126
-960.019287109375	2	A	0.0039403473862032	0.050776397569013	0.03873623640836
-925.041748046875	2	C	0.0039362983069634	0.00547894918105684	0.00648384039698146
-922.863586425781	2	A	0.00393043741778826	0.0404768313565869	0.0320371152599393
-918.985595703125	2	C	0.00392990559936248	-0.0241976051228088	-0.0173907002587976
-938.054809570312	2	A	0.00392283092987214	0.0433932714795145	0.0415656785679352
-952.300964355469	2	A	0.00391807330597071	0.0539847824089577	0.0526900756993094
-938.896301269531	2	A	0.00390920544867313	0.0432075299467666	0.040884460919137
-918.62353515625	2	A	0.00390598520310851	0.0405436877403175	0.0394150273697351
-940.653686523438	2	A	0.00388205579523716	0.0325670207445315	0.0376845331490984
-918.587341308594	2	A	0.00386025843595639	0.0420256786308284	0.0473925689610602
-944.063293457031	2	C	0.00384447645727029	-0.0108918102769628	-0.00500447372654549
-980.479553222656	2	C	0.00383412917234354	-0.0262635632207469	-0.0305873497852977
-905.854248046875	2	C	0.00382809625193645	-0.0509229481136295	-0.0545129795504416
-942.082763671875	2	A	0.00381273797189762	0.0444743475872274	0.0435604050553623
-934.656066894531	2	C	0.00378297587449155	-0.0394312931297934	-0.0485932573378814
-906.89697265625	2	A	0.00374570932202412	0.0339271553171168	0.0282809191934174
-905.890197753906	2	C	0.00373151556865197	-0.024218298123225	-0.0186657492773445
-948.655822753906	2	C	0.00372441631900937	-0.017476081747813	-0.0110316891494553
-959.908325195312	2	A	0.00371442848581406	0.0342932290876843	0.0310906799107696
-946.192810058594	2	B	0.00369361746355479	-0.038238592789904	-0.0417491451554952
-933.524536132812	2	A	0.00368140176962546	0.0376205271222568	0.0348149137052689
-999.531311035156	2	A	0.0036708372022316	0.0419178472824249	0.0360426545514402
-905.602661132812	2	A	0.00366188804899887	0.0371789230194049	0.0403042300562272
-904.560729980469	2	A	0.00366151022492225	0.0483872255903629	0.0393416043647449
-967.02587890625	2	A	0.00364664009773375	0.0358270208382791	0.0367448112342897
-961.833374023438	2	A	0.00364124181915343	0.0500921543232852	0.0471568448381178
-945.71533203125	2	A	0.00362363829859195	0.038772747366622	0.038929243234765
-994.026245117188	2	B	0.00362302096270583	-0.0278102959641648	-0.035044986078868
-922.138061523438	2	A	0.0036165759251259	0.0396894571745094	0.0338599942728403
-921.920471191406	2	C	0.00361497501678999	-0.0109725715482311	-0.00817330765900041
-996.512939453125	2	C	0.00361344604654759	-0.0240208863758058	-0.0216798334099216
-925.586669921875	2	C	0.00360019116631399	-0.000201285421933851	-0.00370132703005591
-927.076965332031	2	A	0.00359739327950109	0.0402217752115896	0.0381187534803433
-946.266296386719	2	A	0.00359027149639919	0.0350158580852316	0.0345803953604497
-997.644348144531	2	C	0.00358755032912394	-0.0386413413940509	-0.0374227165960138
-986.959838867188	2	C	0.00356886986009821	-0.00770354721402719	-0.0073488017929185
-956.544067382812	2	B	0.00356755616082941	-0.0263554430477736	-0.0341563371597065
-981.826293945312	2	A	0.0035614851177778	0.0318618564397332	0.0359368988957353
-995.683715820312	2	A	0.0035606803581847	0.0326251406575274	0.0326734264590619
-949.575622558594	2	A	0.00354754516564472	0.0399068842159591	0.0381317579086198
-990.565063476562	2	C	0.00354075441437422	-0.00252469837204454	-0.00790021238532976
-970.222473144531	2	A	0.00353702890647679	0.033894961483528	0.0342653656238723
-926.277160644531	2	C	0.00352995388417487	-0.00403664201467942	-0.00483641570245392
-981.15283203125	2	A	0.00352226894457903	0.0343450789571067	0.0416777456263345
-927.222412109375	2	A	0.00350510856591621	0.0346202558912905	0.033535024774141
-946.450012207031	2	A	0.00349425060263787	0.0428865972028226	0.0325784624960938
-979.395385742188	2	C	0.00349405845239093	-0.00985834384583178	-0.00848238004662365
-902.083984375	2	A	0.00349155533954646	0.0283241643148307	0.0297190584575691
+938.823120117188	2	A	0.00557	0.05215	0.0619
+938.859741210938	2	A	0.00542	0.05732	0.05566
+952.817016601562	2	A	0.00541	0.05418	0.0557
+980.9658203125	2	A	0.00531	0.06408	0.05961
+948.876525878906	2	A	0.00513	0.05809	0.05014
+926.022705078125	2	A	0.00495	0.05629	0.04434
+964.835876464844	2	A	0.00488	0.05652	0.05496
+982.013427734375	2	A	0.00486	0.0488	0.05097
+995.19384765625	2	A	0.00482	0.06058	0.053
+980.591796875	2	A	0.00472	0.05718	0.05344
+907.976257324219	2	A	0.00469	0.06103	0.05243
+907.0048828125	2	A	0.00465	0.04964	0.04877
+950.238220214844	2	C	0.00464	-0.03406	-0.03061
+995.985229492188	2	A	0.00463	0.0468	0.05582
+921.521667480469	2	A	0.00462	0.04921	0.04998
+915.04345703125	2	A	0.00454	0.04623	0.0426
+929.514953613281	2	A	0.00454	0.05638	0.04524
+958.31787109375	2	A	0.00451	0.04596	0.04237
+962.870727539062	2	C	0.00448	-0.05818	-0.05993
+942.412719726562	2	A	0.00447	0.05263	0.04996
+922.065551757812	2	A	0.00447	0.04959	0.04995
+918.261596679688	2	C	0.00445	-0.01589	-0.01416
+973.64794921875	2	A	0.00445	0.03957	0.03729
+991.993957519531	2	A	0.00443	0.04403	0.05029
+976.332946777344	2	A	0.00438	0.04926	0.04488
+979.582275390625	2	C	0.00438	-0.03448	-0.03254
+913.41845703125	2	C	0.00438	-0.00388	-0.00439
+948.619018554688	2	A	0.00426	0.03718	0.04292
+901.330810546875	2	A	0.00425	0.05527	0.04825
+960.278381347656	2	C	0.00423	-0.04333	-0.04094
+992.294921875	2	C	0.00419	-0.03919	-0.03428
+994.967834472656	2	A	0.00418	0.03831	0.04765
+948.471862792969	2	A	0.00417	0.03801	0.04088
+904.237426757812	2	A	0.00417	0.04752	0.0431
+942.852722167969	2	B	0.00414	-0.04686	-0.04972
+918.442565917969	2	A	0.00413	0.04233	0.0458
+943.109436035156	2	B	0.00413	-0.04138	-0.04727
+936.5556640625	2	A	0.00411	0.04071	0.04148
+945.054321289062	2	A	0.00408	0.04811	0.04229
+992.595886230469	2	A	0.00408	0.03692	0.04106
+913.310180664062	2	A	0.00408	0.04984	0.04001
+910.965698242188	2	C	0.00406	-0.03826	-0.03796
+950.606384277344	2	C	0.00406	-0.0503	-0.05647
+974.020629882812	2	A	0.00405	0.04531	0.0358
+903.770629882812	2	C	0.00403	-0.03089	-0.0358
+993.197998046875	2	C	0.00402	-0.02274	-0.02292
+955.140930175781	2	A	0.004	0.05453	0.04304
+923.734497070312	2	A	0.00397	0.04893	0.04461
+943.292846679688	2	C	0.00396	-0.00589	-0.00813
+927.768005371094	2	A	0.00396	0.04467	0.04199
+965.540893554688	2	C	0.00396	-0.06223	-0.06294
+907.508483886719	2	A	0.00395	0.03389	0.03151
+960.019287109375	2	A	0.00394	0.05078	0.03874
+925.041748046875	2	C	0.00394	0.00548	0.00648
+922.863586425781	2	A	0.00393	0.04048	0.03204
+918.985595703125	2	C	0.00393	-0.0242	-0.01739
+938.054809570312	2	A	0.00392	0.04339	0.04157
+952.300964355469	2	A	0.00392	0.05398	0.05269
+938.896301269531	2	A	0.00391	0.04321	0.04088
+918.62353515625	2	A	0.00391	0.04054	0.03942
+940.653686523438	2	A	0.00388	0.03257	0.03768
+918.587341308594	2	A	0.00386	0.04203	0.04739
+944.063293457031	2	C	0.00384	-0.01089	-0.005
+980.479553222656	2	C	0.00383	-0.02626	-0.03059
+905.854248046875	2	C	0.00383	-0.05092	-0.05451
+942.082763671875	2	A	0.00381	0.04447	0.04356
+934.656066894531	2	C	0.00378	-0.03943	-0.04859
+906.89697265625	2	A	0.00375	0.03393	0.02828
+905.890197753906	2	C	0.00373	-0.02422	-0.01867
+948.655822753906	2	C	0.00372	-0.01748	-0.01103
+959.908325195312	2	A	0.00371	0.03429	0.03109
+946.192810058594	2	B	0.00369	-0.03824	-0.04175
+933.524536132812	2	A	0.00368	0.03762	0.03481
+999.531311035156	2	A	0.00367	0.04192	0.03604
+905.602661132812	2	A	0.00366	0.03718	0.0403
+904.560729980469	2	A	0.00366	0.04839	0.03934
+967.02587890625	2	A	0.00365	0.03583	0.03674
+961.833374023438	2	A	0.00364	0.05009	0.04716
+945.71533203125	2	A	0.00362	0.03877	0.03893
+994.026245117188	2	B	0.00362	-0.02781	-0.03504
+922.138061523438	2	A	0.00362	0.03969	0.03386
+921.920471191406	2	C	0.00361	-0.01097	-0.00817
+996.512939453125	2	C	0.00361	-0.02402	-0.02168
+925.586669921875	2	C	0.0036	-2e-04	-0.0037
+927.076965332031	2	A	0.0036	0.04022	0.03812
+946.266296386719	2	A	0.00359	0.03502	0.03458
+997.644348144531	2	C	0.00359	-0.03864	-0.03742
+986.959838867188	2	C	0.00357	-0.0077	-0.00735
+956.544067382812	2	B	0.00357	-0.02636	-0.03416
+981.826293945312	2	A	0.00356	0.03186	0.03594
+995.683715820312	2	A	0.00356	0.03263	0.03267
+949.575622558594	2	A	0.00355	0.03991	0.03813
+990.565063476562	2	C	0.00354	-0.00252	-0.0079
+970.222473144531	2	A	0.00354	0.03389	0.03427
+926.277160644531	2	C	0.00353	-0.00404	-0.00484
+981.15283203125	2	A	0.00352	0.03435	0.04168
+927.222412109375	2	A	0.00351	0.03462	0.03354
+946.450012207031	2	A	0.00349	0.04289	0.03258
+979.395385742188	2	C	0.00349	-0.00986	-0.00848
+902.083984375	2	A	0.00349	0.02832	0.02972
Binary file test-data/imzml_filtered.RData has changed
Binary file test-data/imzml_filtered.pdf has changed
Binary file test-data/imzml_filtered3.RData has changed
Binary file test-data/imzml_filtered3.pdf has changed
Binary file test-data/imzml_filtered4.RData has changed
Binary file test-data/imzml_filtered4.pdf has changed
Binary file test-data/imzml_filtered5.RData has changed
Binary file test-data/imzml_filtered5.pdf has changed
Binary file test-data/kmeans_analyze.pdf has changed
--- a/test-data/loadings_pca.tabular	Thu Oct 25 07:28:42 2018 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1200 +0,0 @@
-mz	PC1	PC2
-300.08	-0.00431122859758329	0.00526403166713949
-300.17	-0.000423445750267208	0.00051702937765159
-300.25	4.65194150536899e-11	-4.22150087099464e-11
-300.33	1.35108612188122e-11	-1.22607072500498e-11
-300.42	1.05327734584566e-12	-9.55817595104931e-13
-300.5	-8.10333136001904e-07	9.89420809472527e-07
-300.58	-5.81387112967612e-07	7.09876570972713e-07
-300.67	-1.07032789780076e-07	1.3068757132126e-07
-300.75	3.41674858316537e-15	-3.099477097213e-15
-300.83	1.91005306978273e-15	-1.73400711936836e-15
-300.92	3.0935599995382e-16	-2.77380998949046e-16
-301	-6.65648097524728e-19	1.46948889144108e-18
-301.08	-6.24592367703673e-11	7.62630392533733e-11
-301.17	-1.86468400473725e-11	2.27678809866643e-11
-301.25	-1.54395235623673e-12	1.88517524320557e-12
-301.33	2.98688326385702e-19	-3.5847546239491e-19
-301.42	8.89316552145388e-20	-1.13353541808862e-19
-301.5	-1.80421834428211e-18	3.57218991846548e-18
-301.58	-4.42908079426941e-15	5.40912624674897e-15
-301.67	-2.60749760943137e-15	3.18475128356288e-15
-301.75	-4.40359280065527e-16	5.39122160392572e-16
-301.83	-1.38008713975051e-18	2.88001159253086e-18
-301.92	-1.40307577498072e-19	2.77975673360276e-19
-302	3.62667249262872e-18	-7.13083020490704e-18
-302.08	-1.08392092461489e-18	2.3266850449903e-18
-302.17	-1.89685413709983e-19	1.23861281753609e-19
-302.25	1.84071706842555e-19	-4.72845441155538e-19
-302.33	2.65842917715123e-18	-5.67839989734713e-18
-302.42	8.89384394284211e-19	-1.78363962868074e-18
-302.5	-7.90254051855962e-19	1.67197231393762e-18
-302.58	-2.54806306921044e-18	4.84666648270261e-18
-302.67	0.00238735543431953	0.00059717760153527
-302.75	0.0422753281275894	0.0105748304975569
-302.83	0.0478251463644703	0.0119630725230272
-302.92	0.0117873138328592	0.00294850096557018
-303	0.000543891887813245	0.000136050145022238
-303.08	7.47436204207542e-19	-1.56423855319991e-18
-303.17	1.14392477830951e-19	-2.37594932440985e-19
-303.25	-2.00896832566757e-18	3.98635625264106e-18
-303.33	4.18546560129704e-06	1.04696027795764e-06
-303.42	1.7855922607419e-06	4.46651423688008e-07
-303.5	2.40845866549495e-07	6.02456403664431e-08
-303.58	-1.26795648107974e-18	2.62533136732221e-18
-303.67	-1.06780307773474e-18	2.0810699955122e-18
-303.75	1.2643870416402e-18	-2.51396059682868e-18
-303.83	0.00179950042171087	-0.057307260525996
-303.92	0.00323910627580984	-0.117042680086361
-304	-0.00221983247055412	-0.135440075021637
-304.08	0.00167857919888097	-0.0398049258709
-304.17	0.015254290192657	0.012790595615181
-304.25	0.00615007956388472	0.00664260824343149
-304.33	0.000463810193289094	0.000732422023079692
-304.42	-0.0121864568041163	-0.000404596261869822
-304.5	-0.0206720168643015	-0.000503758798744126
-304.58	-0.0328176999234842	-0.0126423547079233
-304.67	-0.0482606832428354	-0.0105800636691633
-304.75	-0.0142742734952315	-0.00471930409453522
-304.83	-0.00118635057916411	-0.000662474245569403
-304.92	-0.00138871717853178	-4.61060822079781e-05
-305	-0.0527117640926545	-0.00175005607056224
-305.08	-0.0428954493028061	-0.00142414962759593
-305.17	-0.00848209306364131	-0.000281745808963649
-305.25	-1.99382379701303e-06	-5.72938648410526e-07
-305.33	-3.36192825452903e-07	-1.33981156083197e-07
-305.42	2.5761506940952e-12	2.78245755255616e-12
-305.5	-3.48349631092745e-19	7.59816858773693e-19
-305.58	-4.42256844036834e-06	-1.4683141192802e-07
-305.67	-0.00571542047365585	0.00879722931697928
-305.75	-0.0254911789946344	0.0392460448983895
-305.83	-0.0105718033678137	-0.00291019853705438
-305.92	0.00618064757489481	-0.131084648437099
-306	-0.000838690930111978	-0.0744131926836283
-306.08	-0.0130494766825355	0.00166045771715343
-306.17	0.0331859098477607	0.0161552601031249
-306.25	0.0699660376819185	0.0184786284566642
-306.33	0.0225906387134967	0.00565340171628555
-306.42	0.00212956077044587	0.000533291798037169
-306.5	0.00298787533493201	0.000738712875826988
-306.58	0.0950317607456352	0.0237696453640889
-306.67	0.12310606507388	0.0260031521356849
-306.75	0.0306645997652937	-0.0571757038136143
-306.83	0.052354303911106	-0.0321262325343371
-306.92	0.155556078072762	0.0570827792134531
-307	0.0803613477432971	0.0327455853493654
-307.08	0.0743067736583372	-0.125534209424419
-307.17	0.0248520043381169	-0.333754175516718
-307.25	0.00374032201816756	-0.130440896008766
-307.33	0.000503197257887978	-0.0160249245748421
-307.42	-1.62410714703793e-06	2.50047792504396e-06
-307.5	-7.94043758372008e-07	1.22251102271752e-06
-307.58	9.91839124411223e-06	3.11197839976271e-06
-307.67	-0.00110952032451366	0.00134527568438586
-307.75	-0.0070017978077297	0.00853357571857559
-307.83	-0.00380156902044159	0.004638352443086
-307.92	-0.000221987775009971	-0.0115190081818464
-308	0.000661876209074029	-0.0734801779318058
-308.08	-0.0147502762680739	-0.0193825730864178
-308.17	-0.0117112557076823	0.0122349179874748
-308.25	-0.0228406483765769	0.0425283694378973
-308.33	-0.00914741206037792	0.0174891324702549
-308.42	-0.000882588817192316	0.00186354045468429
-308.5	-6.54966198300399e-09	7.99717001951695e-09
-308.58	1.51022779280689e-07	-4.80950282729707e-06
-308.67	4.40677140364624e-08	-1.40338803260422e-06
-308.75	-1.76702391660078e-06	2.70915004534841e-06
-308.83	-1.23862052028093e-06	2.31191973286508e-06
-308.92	-2.2574787386999e-07	4.4648071264709e-07
-309	6.29723515645176e-09	-5.31666806266496e-09
-309.08	1.10303381677504e-11	-3.51274464403603e-10
-309.17	6.2162647149897e-12	-1.97964431850131e-10
-309.25	1.02187630351306e-12	-3.25427890501742e-11
-309.33	-1.33797016426012e-10	2.41714053605249e-10
-309.42	-3.95327592736273e-11	7.59090227769834e-11
-309.5	-3.20207525058694e-12	6.93595218795396e-12
-309.58	-1.8970482032035e-17	2.28173491054589e-17
-309.67	7.07726410653746e-16	-2.25161408222732e-14
-309.75	-0.00797239160401278	0.0090976727741681
-309.83	-0.0255597032204475	0.0291673851028122
-309.92	-0.0111847820371263	0.0127634832906413
-310	-0.00158069353428561	0.00180380408357649
-310.08	1.80641749602905e-17	-1.72899384919771e-17
-310.17	-2.47320958272535e-18	3.15351296840965e-18
-310.25	4.37592672350038e-19	-1.73542942293083e-18
-310.33	-5.54867946643355e-07	6.33186032770175e-07
-310.42	-1.35437147465404e-06	1.54553728706427e-06
-310.5	-3.18377506530102e-07	3.63315616811884e-07
-310.58	-1.1448516447297e-08	1.30644430880437e-08
-310.67	6.930631151532e-20	-1.39632113442089e-19
-310.75	1.2987938130898e-18	-2.59800824752109e-18
-310.83	5.94700286473475e-19	-1.1372141099925e-18
-310.92	-1.23453109280896e-10	1.40878176570004e-10
-311	-4.9265637231407e-11	5.62193456729797e-11
-311.08	-6.23222337812304e-12	7.11188572240036e-12
-311.17	3.06073427125538e-18	-6.14934442575623e-18
-311.25	-5.3847655851313e-19	1.16409928935806e-18
-311.33	2.95812573451775e-18	-6.14460219930446e-18
-311.42	-4.7870540006937e-15	5.46211476149954e-15
-311.5	0.0110301120139346	-0.010009503601118
-311.58	0.0090887864403089	-0.00824780750087986
-311.67	0.00194811643158114	-0.00176785860494228
-311.75	2.8536487788562e-05	-2.58960268873156e-05
-311.83	-2.20332263715659e-18	4.61930451760898e-18
-311.92	3.09219956259735e-18	-6.23487179916691e-18
-312	2.57252650284934e-19	-1.14290997229296e-18
-312.08	8.88630349896832e-07	-8.06406016198295e-07
-312.17	3.14709126168042e-07	-2.8558931475244e-07
-312.25	3.46313782180539e-08	-3.14269614388258e-08
-312.33	-3.32776049870564e-20	6.8423711417313e-20
-312.42	2.35425854202309e-18	-4.56738094299296e-18
-312.5	3.07241213572477e-18	-6.34673660328129e-18
-312.58	4.72076105635388e-11	-4.28395230854417e-11
-312.67	4.12523387802137e-11	-3.74352892773729e-11
-312.75	8.12759802377935e-12	-7.37555782934598e-12
-312.83	1.74157964649448e-18	-3.62886419813455e-18
-312.92	2.62079928352012e-18	-5.73896523461765e-18
-313	-5.19200680222055e-05	7.99362186128295e-05
-313.08	-0.00771442880310657	0.0118771467520903
-313.17	-0.0183562076395966	0.0282612462324566
-313.25	-0.00596890965674153	0.00918974272139836
-313.33	-0.000579017736041075	0.000891456619607948
-313.42	-7.80840145180217e-19	1.82891401534034e-18
-313.5	4.78362388490033e-19	-9.99184626675487e-19
-313.58	-1.93173896966808e-18	4.18205932735529e-18
-313.67	-1.1451635605695e-06	1.76309562395104e-06
-313.75	-8.0724129753878e-07	1.2428299748326e-06
-313.83	-1.47574090184383e-07	2.27205301997189e-07
-313.92	0.000809945634290757	-0.000735001941313237
-314	0.0100094278817245	-0.00908326264508433
-314.08	0.00680292513209354	-0.00617345531231344
-314.17	0.00134539362888809	-0.00122090531413151
-314.25	-8.70544777503152e-11	1.34029212952048e-10
-314.33	-2.58028504957472e-11	3.97261093568059e-11
-314.42	-2.10405629711749e-12	3.23940886506817e-12
-314.5	1.50606071443998e-19	-3.26629739057003e-19
-314.58	7.01148603785718e-07	-6.36271822593896e-07
-314.67	-0.00786121621836074	0.00897085810951358
-314.75	-0.0265784278436019	0.0303299049590531
-314.83	-0.0205567458940219	0.0234582740957598
-314.92	-0.0216361347654027	0.0246900157406327
-315	-0.00682596769718489	0.00778943428278313
-315.08	-0.00062880934830992	0.000717564070487571
-315.17	3.06725294690812e-11	-2.78344202133668e-11
-315.25	5.56382251036721e-12	-5.04900549389141e-12
-315.33	2.3808955025814e-18	-5.11797779451209e-18
-315.42	-1.41653364910304e-06	1.61647348164201e-06
-315.5	-9.33822318159701e-07	1.06562877262067e-06
-315.58	-1.65963451882263e-07	1.89388737120187e-07
-315.67	3.32303165485681e-15	-3.01689646198691e-15
-315.75	0.0133386192285338	0.00593680216000815
-315.83	0.0204427540118315	0.0385209679014543
-315.92	0.0205311009100069	0.0349708521406396
-316	0.0165454003282334	0.0202982275878822
-316.08	0.00389353092948387	0.0042053441393545
-316.17	0.0122368579868054	0.0031742424747458
-316.25	0.0622105088359064	0.0155614542865522
-316.33	0.0279064155011238	0.00698092951319489
-316.42	0.00392898980899877	0.000984672021870285
-316.5	1.26422039523287e-06	2.03812937962845e-06
-316.58	5.91821058296206e-07	6.70065026993984e-07
-316.67	7.59175808605326e-08	8.1997436365456e-08
-316.75	1.42932217288407e-06	3.57533350400182e-07
-316.83	3.38364637299684e-06	8.46391700389636e-07
-316.92	7.93073879456759e-07	1.98544597361044e-07
-317	2.80472477369263e-08	7.13530163897473e-09
-317.08	7.08469003553349e-11	9.02484258097797e-11
-317.17	1.63892813113305e-11	1.77018300136747e-11
-317.25	2.5952631455071e-13	2.80314058103478e-13
-317.33	3.09148831535689e-10	7.73310754281976e-11
-317.42	1.22886551861536e-10	3.07440250179752e-11
-317.5	1.54783255454924e-11	3.880363151428e-12
-317.58	6.32802946949525e-15	9.67837056460049e-15
-317.67	2.6106733007082e-15	2.90065647043201e-15
-317.75	2.93744385857263e-16	3.1474976541265e-16
-317.83	1.21476715833385e-14	3.03239062006186e-15
-317.92	1.54804806155156e-14	3.87687750508053e-15
-318	-0.0164809472517528	0.0188071876737008
-318.08	-0.0207983472272559	0.0237339767933606
-318.17	-0.00568729926431134	0.0064900459291866
-318.25	-0.000380369004932044	0.000434057044885767
-318.33	-0.0054759603410127	0.00624887709753394
-318.42	-0.0320439329027523	0.0365668459888611
-318.5	-0.0174046894275635	0.0198613135195715
-318.58	-0.0029745600218737	0.00339441099613389
-318.67	6.77219029512895e-19	-1.30965314356898e-18
-318.75	2.18947139440182e-18	-4.72128554737912e-18
-318.83	-3.55598550196436e-18	7.30618959963614e-18
-318.92	6.40268073450107e-19	-1.35306766632003e-18
-319	-1.94312896137121e-06	2.2173962753734e-06
-319.08	-5.38867732557724e-07	6.14927432428924e-07
-319.17	-3.74640814251324e-08	4.27520335833109e-08
-319.25	1.79756533061535e-18	-3.70449280455239e-18
-319.33	5.32876750622594e-18	-1.16736728350286e-17
-319.42	1.2482696794362e-18	-2.32525857202395e-18
-319.5	-1.50904101929418e-10	1.72203802501494e-10
-319.58	-7.76080804646697e-11	8.8562247656586e-11
-319.67	-1.2074386001956e-11	1.37786522910704e-11
-319.75	-1.1086287772001e-18	2.264618374908e-18
-319.83	2.32023991215123e-18	-4.54433093483871e-18
-319.92	-1.94928828490999e-18	4.17788020410552e-18
-320	-2.99375231579372e-16	3.41622239704057e-16
-320.08	-9.04565141003776e-15	1.03234841020712e-14
-320.17	-2.30459556958099e-15	2.63143054737972e-15
-320.25	-1.22113740454881e-16	1.39801268516935e-16
-320.33	1.72031851335011e-18	-3.52483755070958e-18
-320.42	-2.23773160580469e-18	4.68258590242082e-18
-320.5	3.73821567858117e-18	-7.6630539274553e-18
-320.58	3.04800956448437e-19	-1.32065009622256e-18
-320.67	1.12233460095696e-19	-5.45670293037736e-19
-320.75	2.62729120699377e-19	-6.13716057232121e-19
-320.83	-0.00977644367386857	-0.000324582659952139
-320.92	-0.0192589313007296	-0.000639405836923595
-321	-0.00604008640911402	-0.000200533791060569
-321.08	-0.000550507963199529	-1.82771307216498e-05
-321.17	-0.000420316889914967	0.000647120546616738
-321.25	-0.0160493050059121	0.0247095352992969
-321.33	-0.0133044907952425	0.0204836150115606
-321.42	-0.00280369984754082	0.00431457938840582
-321.5	-2.99616718683881e-05	4.48264678207248e-05
-321.58	-1.46349424819279e-07	-4.85887170842312e-09
-321.67	8.41332254348306e-19	-1.72675834706338e-18
-321.75	-1.87008181215012e-18	3.86935362294697e-18
-321.83	-1.31657543889011e-06	2.02700162215447e-06
-321.92	-4.56505001745567e-07	7.0283582066507e-07
-322	-4.88969458105591e-08	7.51388050703725e-08
-322.08	-2.60463179666409e-11	-8.64742620548254e-13
-322.17	-1.96590681986306e-12	-6.52680521131685e-14
-322.25	8.24793934760696e-19	-1.67223365131239e-18
-322.33	-7.30693874872574e-11	1.12497743319435e-10
-322.42	-6.02941109059918e-11	9.28289079087217e-11
-322.5	-1.167493418482e-11	1.79640564769487e-11
-322.58	-3.70117153107426e-15	-1.23930667033408e-16
-322.67	-0.00331903464427215	-0.000110193555985052
-322.75	-0.0236609525796025	-0.000785555073141427
-322.83	-0.014332149893613	-0.0004758343105618
-322.92	-0.00255264113548894	-8.47489206916858e-05
-323	-1.98402274310622e-15	3.05586239499595e-15
-323.08	-1.77351425814403e-16	2.70693931910824e-16
-323.17	-1.43507077210745e-18	3.01872564535294e-18
-323.25	2.53586609720789e-18	-5.05056278138417e-18
-323.33	-1.56715160885578e-06	-5.20301916201867e-08
-323.42	-4.52431500789054e-07	-1.50209447165971e-08
-323.5	-3.47838869509723e-08	-1.15484187694377e-09
-323.58	-2.62003598968519e-18	5.12413512019678e-18
-323.67	1.30703704271011e-18	-2.6982978997337e-18
-323.75	1.09858918917032e-18	-2.19801617012949e-18
-323.83	-1.16017960747978e-10	-3.8518563427311e-12
-323.92	-6.40951594120246e-11	-2.12799304880443e-12
-324	-1.0417877913849e-11	-3.45874609755556e-13
-324.08	-8.51073475746203e-19	1.96116189391651e-18
-324.17	-1.86799679355626e-18	4.11450834641418e-18
-324.25	7.0332219361982e-19	-1.48753874788881e-18
-324.33	-7.26497503481e-19	1.4685144209807e-18
-324.42	-0.0013862896374605	2.92556750799658e-05
-324.5	-0.0202688214408515	0.000427744706670055
-324.58	-0.0146774599074953	0.000309746957962782
-324.67	-0.00299977766843249	6.33060497673155e-05
-324.75	-8.60343295476301e-06	1.81563240684231e-07
-324.83	-1.72925710459754e-18	3.64089285180715e-18
-324.92	-4.92042420206089e-19	-2.33168469263363e-19
-325	2.60789564724286e-19	-1.09362753367403e-18
-325.08	-1.48175811637682e-06	3.12704018225005e-08
-325.17	-4.9588013882998e-07	1.04648464669524e-08
-325.25	-5.03428867824452e-08	1.06241517598129e-09
-325.33	6.90788943617698e-19	-1.41623665796614e-18
-325.42	-3.04403059955579e-18	6.66244207818103e-18
-325.5	-2.77264610811149e-18	5.5685017151391e-18
-325.58	-8.79371547884039e-11	1.85578918928605e-12
-325.67	-6.635439487682e-11	1.40031758361703e-12
-325.75	0.000302844775153668	-0.00964445806872736
-325.83	0.00367083780664456	-0.116902263975602
-325.92	0.0030883572514132	-0.0983524671131379
-326	0.000676494883991705	-0.0215437967222071
-326.08	1.34199599191956e-05	-0.000427374833662222
-326.17	-7.0521131671285e-15	1.46428170366507e-16
-326.25	-2.14806099330267e-15	4.51960678938036e-17
-326.33	-1.87163127233327e-16	7.97514865558367e-18
-326.42	2.97316109549007e-07	-9.46839063814926e-06
-326.5	1.08163453942656e-07	-3.44459584196385e-06
-326.58	1.23221260658378e-08	-3.92412988451608e-07
-326.67	-1.41521030777172e-18	1.76095471736936e-18
-326.75	0.00549732350160794	0.00137511089315003
-326.83	0.0962963523709597	-0.0334416260931875
-326.92	0.0605433521403459	-0.1603443276671
-327	0.0787685768932973	-0.0514791863852633
-327.08	0.230441004723077	0.0881989547143443
-327.17	0.0988403374652627	0.0685593205098278
-327.25	0.0118529635790329	0.0148248790639326
-327.33	-0.000624878689990424	0.000713078600181394
-327.42	1.05462326665993e-07	-3.35857518108936e-06
-327.5	-2.27218782206777e-06	-9.61275906267438e-06
-327.58	-0.0126322373908445	0.0194459527024737
-327.67	-0.0323686444621871	0.0481506261922548
-327.75	-0.0285935301941694	0.0430843923184673
-327.83	-0.0174296434280434	0.0715996079219228
-327.92	-0.0336276926092689	0.114162767641004
-328	-0.0494850982264577	-0.0249268038186268
-328.08	-0.00957173773722432	-0.0619664011896441
-328.17	0.00588687036342969	-0.0182161017939051
-328.25	0.00190296894243281	-0.00113972410369882
-328.33	0.0174991274504944	0.00437758135598877
-328.42	0.103765595483177	0.0259561635423597
-328.5	0.0619555096710506	0.0154976683133901
-328.58	0.0118289963089407	0.00204768983535254
-328.67	-0.00271503653389271	0.0112599942984591
-328.75	-0.000681719281395158	0.137538744971696
-328.83	0.130472684695182	0.242181848565893
-328.92	0.338907721560253	-0.00818289230672464
-329	0.409778131985417	0.120695530580546
-329.08	0.273007580980106	-0.0472021189076567
-329.17	0.207763261390437	-0.176699018045875
-329.25	0.26054779532115	-0.0318392361741353
-329.33	0.0860486345977859	0.0115245609172036
-329.42	0.00766622684227022	0.00248826292326992
-329.5	3.41712375862885e-19	-7.65290338736351e-19
-329.58	-7.18866881214753e-06	1.10763584160728e-05
-329.67	3.46232114154745e-07	1.2590639047126e-07
-329.75	-0.000200897302239539	0.000332179039406185
-329.83	-0.0014870833538708	0.0196286301635167
-329.92	0.0387543104684878	0.0331505655890544
-330	0.0535975865777487	0.0145464442237178
-330.08	0.0773485033233042	0.0241940762460859
-330.17	-0.0159064570296111	0.0808930646802957
-330.25	-0.0256255172476364	0.0464082474760022
-330.33	-0.00518705089831004	0.00798599106318466
-330.42	-5.87070713698737e-11	-4.20641938886987e-11
-330.5	-4.41470219412323e-12	9.57888704865918e-13
-330.58	3.58905894274251e-06	5.33910263750083e-07
-330.67	4.09299073698543e-06	8.52763421786791e-07
-330.75	-2.39230149619026e-06	5.20292303043525e-06
-330.83	-9.26471819569299e-07	1.42639740681171e-06
-330.92	-6.88248135860013e-08	1.05962768300077e-07
-331	-1.37164632372034e-15	2.60972739037099e-16
-331.08	-7.7248776644979e-11	-2.5166984158493e-11
-331.17	4.04736798117229e-10	8.07881355465537e-11
-331.25	-1.04760321383663e-10	4.07870082540718e-10
-331.33	-1.17132865003812e-10	2.06817550165798e-10
-331.42	-2.11298335121382e-11	3.25315220794141e-11
-331.5	2.63378652966274e-20	-6.95906997642074e-19
-331.58	2.8952057016178e-19	-5.99744071957305e-19
-331.67	0.00418222919082107	-0.00379525050090873
-331.75	0.0074688836585035	-0.0067777931703195
-331.83	0.00241291406573117	-0.00218964884485901
-331.92	0.000231563862616389	-0.000210137423245755
-332	-2.29745417064126e-16	3.53890842154922e-16
-332.08	-2.08487284205614e-18	4.30300678139065e-18
-332.17	-5.06086338690248e-19	-2.08557086617086e-19
-332.25	4.70931221575335e-07	-4.27356290879221e-07
-332.33	3.27131731663186e-07	-2.96862465400277e-07
-332.42	5.94499060316205e-08	-5.39490485492247e-08
-332.5	1.42248939376461e-18	-3.05355170690022e-18
-332.58	-2.59404929648593e-18	5.17728209493877e-18
-332.67	-1.07419837940426e-18	2.12102964333857e-18
-332.75	-2.044761955887e-18	4.39429029788894e-18
-332.83	0.00160890720084802	-0.00146003616286131
-332.92	0.0138197923761245	-0.0125410568252424
-333	0.00853577108423887	-0.00774596226204086
-333.08	0.00159457180203	-0.00144702720829119
-333.17	-8.19965501387259e-20	1.65861920193266e-19
-333.25	1.34384409842688e-18	-2.67678148443513e-18
-333.33	-1.71650133977947e-18	3.49401587050766e-18
-333.42	-2.07251286377413e-18	4.32083045563964e-18
-333.5	9.0961233897789e-07	-8.25446556759817e-07
-333.58	2.75731199018938e-07	-2.50217987455696e-07
-333.67	2.35548003838919e-08	-2.13752914728343e-08
-333.75	7.94625982505466e-19	-1.6867661290004e-18
-333.83	7.53158759238632e-19	-1.45779121341108e-18
-333.92	6.84447053258831e-19	-1.39521810199874e-18
-334	-0.000706553423054604	1.49107511340342e-05
-334.08	-0.0164520057622188	0.000347196195455082
-334.17	-0.0177538225864371	0.000374669219866932
-334.25	-0.0042888805908569	9.05107371749769e-05
-334.33	-0.000179650955399357	3.79127841471271e-06
-334.42	-2.19948297461305e-18	4.28442044661689e-18
-334.5	1.49916018313078e-18	-2.96792796694817e-18
-334.58	4.27792139030343e-15	-3.88307907143461e-15
-334.67	-1.58145314840291e-06	3.33743229117094e-08
-334.75	-6.5553418684e-07	1.38341184698587e-08
-334.83	-0.00704388991919769	-0.000233855877815846
-334.92	-0.0338415622600729	-0.00112355624005388
-335	-0.0138403304706175	-0.000459505667769265
-335.08	-0.00165300051262059	-5.48804167636838e-05
-335.17	-5.35328650883997e-11	1.12973233166406e-12
-335.25	-0.000677475573894172	0.000773099298484868
-335.33	-0.0116678048641373	0.0133146834422584
-335.42	-0.0106313535976181	0.0121299915478721
-335.5	-0.00238413556227817	0.00271856800674216
-335.58	-6.03880622718113e-05	6.84790578858064e-05
-335.67	-2.59873892931221e-09	-8.62793928511323e-11
-335.75	-7.75838305412619e-15	1.61333277100636e-16
-335.83	-2.87405522434015e-15	5.80595887160177e-17
-335.92	-1.00608803941745e-06	1.14809460150015e-06
-336	-3.77013472669637e-07	4.30020008197142e-07
-336.08	-4.45308815275593e-08	5.07453593361072e-08
-336.17	-6.31309588877308e-12	-2.09597938716104e-13
-336.25	-1.47976452321347e-18	2.1507374214481e-18
-336.33	-1.39435541724334e-20	-7.00230463908735e-19
-336.42	-4.6881231947169e-11	5.34983905974045e-11
-336.5	-4.84507309055253e-11	5.5277516298621e-11
-336.58	-9.99482662480436e-12	1.13961437989306e-11
-336.67	-0.000711245042556581	-2.36136794637479e-05
-336.75	-0.0187131563108301	-0.000621285843205386
-336.83	-0.0231267944395531	-0.000767820764458618
-336.92	-0.00501903521438892	-0.000166634397396897
-337	-0.00953031481787751	-0.000316411062846948
-337.08	-0.0269481857960881	-0.000894692806336051
-337.17	-0.0104463541605011	-0.00034682401222018
-337.25	-0.00128153018032499	-4.25474220089563e-05
-337.33	7.94888757752793e-19	-1.58857937670005e-18
-337.42	-4.59901880489022e-19	9.35045558966008e-19
-337.5	4.21510974232015e-18	-8.57298175938022e-18
-337.58	-1.14353261382659e-06	-3.79658360321105e-08
-337.67	-1.32715454325198e-06	-4.40621729342847e-08
-337.75	-2.80908263033374e-07	-9.32629024303685e-09
-337.83	-3.25465764495523e-09	-1.08056214588174e-10
-337.92	2.76442199411816e-18	-4.98663226658663e-18
-338	-1.06408921934573e-19	2.17067153070774e-19
-338.08	-9.09275961903443e-19	1.80922996019493e-18
-338.17	-1.30897235499873e-10	-4.34585935648352e-12
-338.25	-4.56528093821544e-11	-1.51569918558029e-12
-338.33	-4.92061057357128e-12	-1.63364464665173e-13
-338.42	8.01756641277191e-19	-1.6146927965541e-18
-338.5	-4.15987902206696e-18	8.49736173496124e-18
-338.58	-2.39089753790384e-18	5.25610124037681e-18
-338.67	-7.18065816093277e-15	-2.36028017286419e-16
-338.75	-6.0170835886956e-15	-1.99749838158353e-16
-338.83	-1.17081374067575e-15	-3.77268760084377e-17
-338.92	1.36499171395688e-18	-2.82175688090393e-18
-339	-1.14580657139001e-18	2.48593892300026e-18
-339.08	-2.5289457749563e-18	5.3438566247674e-18
-339.17	-1.97620958234151e-18	4.34926478919615e-18
-339.25	1.01663934605953e-18	-3.42627174289353e-18
-339.33	-0.00257118196068514	0.00313942602593874
-339.42	-0.010498631059799	0.0128188810009694
-339.5	-0.00370630493998029	0.00452541685752141
-339.58	-0.000337510863690573	0.000412102451599695
-339.67	2.49263405825478e-18	-5.15640095435064e-18
-339.75	-7.0080561939075e-19	1.32067935773673e-18
-339.83	-0.00100162654186769	0.00122299101420754
-339.92	-0.00549371043128667	0.00670784789667579
-340	-0.00215384241029772	0.00262985234886196
-340.08	-0.000198843261174982	0.000242788615804122
-340.17	2.23972423220155e-18	-4.36755561369607e-18
-340.25	9.0744542413256e-19	-2.01166018463832e-18
-340.33	6.58257668497744e-19	-1.31207533519768e-18
-340.42	-4.45608138655974e-07	5.44089764655367e-07
-340.5	-2.94511476674332e-07	3.59599985125591e-07
-340.58	-5.24002177635346e-08	6.39809278091995e-08
-340.67	1.85415164479615e-18	-4.18206904672749e-18
-340.75	3.59342955137628e-18	-7.84654574837671e-18
-340.83	-9.33791378673967e-19	2.20193664434147e-18
-340.92	2.13936951706388e-18	-4.41241589306151e-18
-341	-3.2220634215163e-11	3.93415590959589e-11
-341.08	-9.2923703895743e-12	1.13460293524117e-11
-341.17	-7.12688254650164e-13	8.70196076232593e-13
-341.25	-7.87441372170756e-18	1.58293500639271e-17
-341.33	2.10994952025933e-18	-4.58987384500465e-18
-341.42	-5.52268221645583e-19	1.07613106105609e-18
-341.5	-2.38619751140873e-15	2.9119681601905e-15
-341.58	-1.31769688883611e-15	1.60939454498144e-15
-341.67	-2.12110517029224e-16	2.57416659133148e-16
-341.75	-1.40610790083568e-19	3.0063300336811e-19
-341.83	5.50074005517338e-19	-1.11836886768701e-18
-341.92	2.05388686310506e-18	-4.50631722940337e-18
-342	-2.1520433162804e-20	4.18753755068177e-20
-342.08	-1.97797945804669e-18	4.24935501967985e-18
-342.17	-2.85833514363315e-18	5.72401642658759e-18
-342.25	0.000387548799193645	-0.0123419596324185
-342.33	0.00422195774641229	-0.134453344157987
-342.42	0.00264818267914462	-0.084334576170218
-342.5	0.000498056763873715	-0.0158612192507684
-342.58	4.68836337125859e-18	-1.00886417529637e-17
-342.67	1.65825457037889e-18	-3.50629071381007e-18
-342.75	1.93813778685519e-18	-3.6782304404893e-18
-342.83	-0.000458871698274944	-1.52347623912507e-05
-342.92	-0.011699936360107	-0.00115469893416563
-343	0.0369313898986381	-0.00172750910745768
-343.08	0.133775156809847	0.0234784434513581
-343.17	0.0685447869502918	0.0150861784711472
-343.25	0.0112636061104166	0.00281749972583108
-343.33	-2.26790836947215e-18	4.74704064293157e-18
-343.42	1.93219545318132e-11	-6.15330940570641e-10
-343.5	-1.27833404616236e-06	-4.28204136753112e-08
-343.58	-0.00020941261659437	0.000320464941611632
-343.67	0.00972962402902607	0.0334602019683382
-343.75	0.102947570420508	0.0917989250115401
-343.83	0.0816842646348894	-0.0403114853985631
-343.92	0.122275972359943	-0.191630292205936
-344	0.238693266432579	-0.0532308782366606
-344.08	0.121629480981159	0.00774919279364609
-344.17	0.0197631414633356	0.00357569185410466
-344.25	0.00300566488144	-0.0957852114890662
-344.33	0.00485055822244328	-0.15952900981665
-344.42	-0.000519735785411468	-0.0336187447171067
-344.5	0.0441217507738693	0.034787967608147
-344.58	0.0619903564301949	0.032561201304759
-344.67	0.0491002434549599	0.0334026313033205
-344.75	0.0657422476457333	-0.0996544391750199
-344.83	0.0646294333256926	-0.0712833982006468
-344.92	-0.0189880715451464	0.078717550189714
-345	0.00788025602178361	-0.0926419645705638
-345.08	-0.0288135803504012	-0.317965632912922
-345.17	-0.0608780945154866	-0.271623033971732
-345.25	-0.0249605340635757	-0.078210281919541
-345.33	-0.00301634360443317	-0.00564391011418585
-345.42	-2.58421417070146e-18	5.11322274676083e-18
-345.5	0.0113323055185911	-0.010283735355908
-345.58	0.0095399209088189	-0.00864869146828234
-345.67	0.00191001734245813	-0.00175502319531808
-345.75	-3.4733736360433e-06	-1.08170095856952e-05
-345.83	9.42317768186343e-05	-0.00302365617739451
-345.92	0.00550337194554684	-0.0825693350890673
-346	0.066581377173144	-0.185975070484974
-346.08	0.170159889961157	-0.0476394761885028
-346.17	0.0813712533835147	0.00729092541579668
-346.25	0.0127405121480917	0.00323261511766381
-346.33	-1.22794799054323e-10	8.45327923108009e-11
-346.42	-1.26108610492889e-11	8.21476778795967e-12
-346.5	1.33913150670194e-07	-4.26462603748786e-06
-346.58	-0.000446994355622208	0.00053641727537962
-346.67	-0.00390695432088853	0.00478179926557781
-346.75	0.00233831205192568	-0.00121912330879647
-346.83	0.0361999101534463	0.0204192074045564
-346.92	0.0847924699358762	0.0444118229557188
-347	0.0341310439477241	0.0138818169685897
-347.08	0.00553337378085645	-0.0341797213346733
-347.17	0.0021480230188406	-0.0684063903892824
-347.25	0.00072585182765202	-0.0231234680735487
-347.33	7.47717020824761e-05	-0.00238328609614253
-347.42	3.19103341964994e-06	2.95447359477885e-06
-347.5	4.28235916503555e-06	1.90585047842687e-06
-347.58	9.32030608025274e-07	3.3569260113998e-07
-347.67	1.35272696442331e-07	-3.98357039182967e-06
-347.75	9.67748577735372e-08	-3.08254769487466e-06
-347.83	1.83150680146187e-08	-5.8357155723354e-07
-347.92	-3.08377128140564e-11	8.53329430179153e-11
-348	4.14190020049953e-10	2.09591635017287e-10
-348.08	1.4947114244755e-10	5.98457735288254e-11
-348.17	1.71477809632913e-11	4.2893870423917e-12
-348.25	1.02372674604369e-11	-3.26025917265651e-10
-348.33	3.14607643757454e-12	-1.00226873943632e-10
-348.42	2.77026731670268e-13	-8.80186258493303e-12
-348.5	2.11031800191524e-14	1.57445355363636e-14
-348.58	1.94598841318505e-14	8.5221385630875e-15
-348.67	3.89139405849484e-15	1.37504552390973e-15
-348.75	6.95744966973678e-16	-2.21830274169437e-14
-348.83	4.33103111273066e-16	-1.38457941630246e-14
-348.92	7.56067563708741e-17	-2.40097306907674e-15
-349	-1.13760683337535e-18	2.55150260251971e-18
-349.08	1.28065160645032e-18	2.37780987332733e-18
-349.17	1.96715790645706e-18	-2.51845384191607e-18
-349.25	6.29298327283855e-19	-1.13909558399454e-18
-349.33	2.86027104515014e-19	-2.06650580061759e-18
-349.42	-2.53861037228761e-18	4.5622075486469e-18
-349.5	1.71744112681525e-18	-4.22360271586197e-18
-349.58	3.82142719184595e-18	-7.99849903369786e-18
-349.67	-1.5971068139466e-18	2.78196814927163e-18
-349.75	1.61057063890667e-18	-3.03819613280394e-18
-349.83	8.23131783174431e-19	-1.82077512679949e-18
-349.92	-1.6296689855549e-18	3.73645309886749e-18
-350	0.000772638112681828	-0.000701146458121257
-350.08	0.009027197979201	-0.00819191777623656
-350.17	0.00751094218475036	-0.00681596005109302
-350.25	0.00162988041838487	-0.00147906874350934
-350.33	2.86988272221085e-05	-2.60433451686335e-05
-350.42	2.61386366650514e-19	-5.55852033348257e-19
-350.5	2.13995015261745e-18	-4.44916732088209e-18
-350.58	2.71296208008486e-18	-5.48293174192686e-18
-350.67	7.27986760608633e-07	-6.60626663870618e-07
-350.75	2.61758701322416e-07	-2.37538355019162e-07
-350.83	2.93810216261436e-08	-2.66624166095913e-08
-350.92	-3.14101812414488e-19	6.60078341493587e-19
-351	-6.22726887842656e-19	1.40435141673225e-18
-351.08	6.81165902418646e-19	-1.47845816591936e-18
-351.17	3.74150824813277e-11	-3.39530943045834e-11
-351.25	3.41274508987358e-11	-3.09696567277935e-11
-351.33	6.808734422664e-12	-6.17872780938033e-12
-351.42	5.66328660315979e-19	-1.16795808691562e-18
-351.5	3.42813238228389e-18	-7.41038850742368e-18
-351.58	4.61624414644417e-19	-9.09309591965222e-19
-351.67	4.49699373421482e-19	-9.97320781960252e-19
-351.75	3.4988538291195e-15	-3.17566644150988e-15
-351.83	1.14230298594455e-15	-1.04110000574825e-15
-351.92	1.07409650112583e-16	-9.40120333737512e-17
-352	-3.31290278838341e-18	6.98846683801753e-18
-352.08	-1.30344415787009e-18	2.31132119908789e-18
-352.17	1.98916025805377e-18	-4.60276566164645e-18
-352.25	-1.12373228092941e-18	2.48599093198128e-18
-352.33	6.28045909597378e-19	-1.11226463665788e-18
-352.42	6.03110354545923e-19	-1.19923962783933e-18
-352.5	-2.60830323402735e-18	5.36281932671988e-18
-352.58	2.33599187378199e-18	-4.9432317542072e-18
-352.67	9.61157557103381e-19	-1.94727120498628e-18
-352.75	1.3521902926464e-18	-2.61623455193324e-18
-352.83	-3.68007682555437e-20	7.35976324447784e-20
-352.92	-0.000697795665272329	-2.31671536903151e-05
-353	-0.0151448494566659	-0.00050281632925054
-353.08	-0.0188303043852377	-0.000625175215953593
-353.17	-0.00478556414460954	-0.000158883044923661
-353.25	-0.000251186111791349	-8.33950043881834e-06
-353.33	-1.13281299537701e-18	2.11362368851923e-18
-353.42	4.58738077433721e-18	-9.431380168251e-18
-353.5	6.30675625009022e-19	-1.23149863775313e-18
-353.58	-1.60180650773864e-06	-5.31807510303553e-08
-353.67	-7.15238875011624e-07	-2.374627669534e-08
-353.75	-1.00343943739771e-07	-3.33146748010741e-09
-353.83	2.88572402429297e-18	-5.89622695151985e-18
-353.92	-1.71286668878086e-18	3.39879342332997e-18
-354	3.45759276876678e-18	-7.06600095837396e-18
-354.08	-3.785833395515e-11	-1.25691623602545e-12
-354.17	-8.68437629616321e-11	-2.88325598904721e-12
-354.25	-2.02963680303847e-11	-6.73849002994596e-13
-354.33	-7.0372516335407e-13	-2.3367343558044e-14
-354.42	-3.46226761877272e-18	7.19389941789176e-18
-354.5	2.70420626990341e-18	-5.61536149684023e-18
-354.58	-4.86056305560119e-19	1.09160344856451e-18
-354.67	-7.94873476500875e-15	-2.74411727847578e-16
-354.75	-3.14891613999578e-15	-1.0453529720325e-16
-354.83	-3.96077148265634e-16	-1.08982565131249e-17
-354.92	2.03204824803319e-18	-3.87955420746582e-18
-355	-0.00020856757460623	-6.9245443848233e-06
-355.08	-0.0119576491292794	-0.000396999736369376
-355.17	-0.0206964666143008	-0.000687132704833768
-355.25	-0.00554091312286172	-0.0250939772942597
-355.33	0.00429977811522588	-0.154413617437976
-355.42	0.00285988773971832	-0.0910765795437691
-355.5	0.000520381655927193	-0.0165721824045581
-355.58	2.39814163674176e-18	-5.39958274865934e-18
-355.67	-1.42128515729742e-06	-4.71873548571926e-08
-355.75	0.000494675044133232	0.000123928941849849
-355.83	0.0350969177430897	0.00877924207629009
-355.92	0.0657573097694266	0.0164387337609208
-356	0.0213810704334823	0.00534537379937861
-356.08	0.00207388964809947	0.000518530371750875
-356.17	2.60048178897126e-18	-5.17706516682313e-18
-356.25	-9.7403730030904e-11	-3.2338487882233e-12
-356.33	-2.72120018009016e-11	-9.03457945717601e-13
-356.42	4.10262806535637e-06	1.02552488528731e-06
-356.5	2.89168603728769e-06	7.22920645419902e-07
-356.58	5.28617351562448e-07	1.32160980803592e-07
-356.67	1.91232658519276e-18	-3.78125702655369e-18
-356.75	-7.50289855283921e-15	-2.44892238792926e-16
-356.83	-0.00793579808231564	-0.000263472335782594
-356.92	-0.028988776088499	-0.000962441391312056
-357	-0.0133832769146884	-0.000444331200976431
-357.08	-0.00191048643980593	-6.34290540821446e-05
-357.17	7.53673878024359e-12	1.8844400835218e-12
-357.25	-0.0213222775165506	0.0328278120929556
-357.33	-0.0217014037441174	0.0334115154308571
-357.42	-0.00505286988151878	0.00777845828330326
-357.5	-0.000172495330031373	0.000263034665781971
-357.58	-3.8259191920917e-07	-1.27022340081849e-08
-357.67	-1.44280559444054e-08	-4.79017968762659e-10
-357.75	3.47172489103831e-18	-7.66772253483255e-18
-357.83	-1.99394253963108e-06	3.0698770787659e-06
-357.92	-7.85276581951879e-07	1.20901306407416e-06
-358	-9.81289398690992e-08	1.50849522195232e-07
-358.08	-5.8986553953767e-11	-1.95839146679546e-12
-358.17	-7.5451634328558e-12	-2.50500829764857e-13
-358.25	-1.2666124676807e-18	2.45989979430498e-18
-358.33	-8.067898247361e-11	1.24213488390643e-10
-358.42	-9.92385094575445e-11	1.52787765143099e-10
-358.5	-2.12604934043343e-11	3.27240944950381e-11
-358.58	-3.14826514746365e-13	4.73075980267417e-13
-358.67	-1.61221335990927e-15	-5.35868135134349e-17
-358.75	-2.79679257130955e-17	-5.45995245771499e-18
-358.83	2.54270893590054e-18	-5.07286832698712e-18
-358.92	-9.70506415540403e-15	1.49407657884731e-14
-359	-3.43396806818041e-15	5.28651022771171e-15
-359.08	-3.80783082915805e-16	5.8648158492968e-16
-359.17	-3.6421079155035e-18	7.24392440620682e-18
-359.25	-2.88542516652259e-18	6.08636165314552e-18
-359.33	-2.5237968470618e-18	4.85040782061318e-18
-359.42	-5.1574249134761e-20	-1.45446217333708e-19
-359.5	1.85454926017685e-18	-4.12556785460159e-18
-359.58	4.93191221403941e-19	-1.10294629196111e-18
-359.67	4.7038671140821e-18	-9.05089569804039e-18
-359.75	5.70031931762508e-19	-1.1218188829256e-18
-359.83	-0.00518249518687779	0.00594918292502701
-359.92	-0.0193797366887151	0.0224278240498086
-360	-0.00799491349682935	0.00930339448908937
-360.08	-0.00104048007247356	0.00121690071582699
-360.17	1.50745911173312e-18	-2.93972989685412e-18
-360.25	-3.34009350758773e-18	7.0549889096742e-18
-360.33	1.46052835567361e-19	-2.85666566051247e-19
-360.42	-7.37213600737332e-07	8.41269274929805e-07
-360.5	-9.96659708995537e-07	1.15781914804669e-06
-360.58	-2.20030069205924e-07	2.56558271984439e-07
-360.67	-4.77018564256682e-09	5.78484858047182e-09
-360.75	-9.3574627141772e-19	1.88045310606789e-18
-360.83	0.00900872739610201	0.00973019068169181
-360.92	0.0242952064861724	0.0262408863502541
-361	0.0099486599257026	0.0107453978538907
-361.08	0.00128173666876805	0.00138438453635669
-361.17	-4.04183321803623e-12	4.73162209446569e-12
-361.25	-8.41658609411701e-19	1.75750020433618e-18
-361.33	8.3705605046766e-19	-1.72550341067656e-18
-361.42	8.92392152189406e-07	9.6385931352052e-07
-361.5	1.24436986020521e-06	1.34402514134245e-06
-361.58	2.72700992572743e-07	2.94540242125812e-07
-361.67	5.43921605700006e-09	5.87481735498771e-09
-361.75	-8.76490495473721e-18	7.87994461317461e-18
-361.83	2.53069908766218e-18	-5.46760760069386e-18
-361.92	-2.37221510800736e-18	4.99939380228195e-18
-362	1.19756670162125e-10	1.29347378757499e-10
-362.08	4.35917246362449e-11	4.70827602661781e-11
-362.17	4.96944540901286e-12	5.36741546232501e-12
-362.25	-1.90032575193061e-18	4.08628670167268e-18
-362.33	1.46894966015457e-18	-2.93485997439529e-18
-362.42	-3.5211897746811e-18	7.40662669679294e-18
-362.5	5.98236370348528e-15	6.47156048560858e-15
-362.58	5.66174576148777e-15	6.10700863875458e-15
-362.67	1.14204690653687e-15	1.22839189843624e-15
-362.75	2.34105504631142e-18	-4.70755662395742e-18
-362.83	-1.21754578102998e-18	2.65764166243399e-18
-362.92	2.36144304508281e-18	-4.99999909169518e-18
-363	4.04186144176126e-18	-8.0631907614541e-18
-363.08	-3.33744877852485e-18	8.6456164889685e-18
-363.17	-1.70787285725121e-18	4.01857824622245e-18
-363.25	-1.47972994964881e-18	3.31425566812463e-18
-363.33	1.25297233692788e-18	-2.42226514438534e-18
-363.42	2.11794963148096e-20	-3.88370328725725e-20
-363.5	-1.11063922675422e-18	2.15552307488203e-18
-363.58	2.27560479393347e-18	-4.86208078662238e-18
-363.67	2.16566310557951e-19	-4.5018861521089e-19
-363.75	-3.34433394883158e-19	6.19043488117874e-19
-363.83	-3.36339566365714e-18	6.26483889839849e-18
-363.92	-1.18875857739403e-18	2.47663831098787e-18
-364	-2.24233221635065e-18	4.78352096230638e-18
-364.08	-2.80669401565339e-19	5.7143795139574e-19
-364.17	2.33777056413057e-18	-4.39062961008809e-18
-364.25	0.0219075072547787	0.0236619683976426
-364.33	0.0425427135061709	0.0459497436575492
-364.42	0.0115736123702206	0.0125004842844907
-364.5	0.000571590774703614	0.000617366580785725
-364.58	1.26489427218455e-19	-2.45328075966681e-19
-364.67	1.79736406723255e-18	-3.50010867610458e-18
-364.75	-1.95369066937696e-18	3.9994093695023e-18
-364.83	3.98902057401701e-06	4.30848099978911e-06
-364.92	1.74124818968478e-06	1.88069592571911e-06
-365	2.39657661944233e-07	2.58850628571141e-07
-365.08	1.43650722940229e-18	-3.06168051417736e-18
-365.17	-2.0529785024702e-18	4.21062890494195e-18
-365.25	1.66735556690736e-18	-3.29279115840949e-18
-365.33	1.07012193497888e-10	1.15582259629711e-10
-365.42	0.00279585055663687	0.000699359520369659
-365.5	0.0715114667357541	0.0178880135193735
-365.58	0.100018198915758	0.0250187413582424
-365.67	0.0279608226610137	0.00699417303917984
-365.75	0.000154791698729485	0.00273223728844257
-365.83	-0.0121410218639653	0.014824248382276
-365.92	-0.00728268048573954	0.00889218927529785
-366	-0.00183787424517966	0.0016473646060974
-366.08	-0.0217470979279575	-0.000720344513545641
-366.17	-0.0207845332248847	-0.000689185859224732
-366.25	-0.00481008755211687	-0.000159560561266003
-366.33	-0.000156206318167995	-5.18612533797514e-06
-366.42	-7.75558565260257e-07	9.46960884780734e-07
-366.5	-2.35382010635387e-07	2.87402611532923e-07
-366.58	-2.01563139210814e-08	2.4610960043824e-08
-366.67	-1.91880448214132e-06	-6.3604153507175e-08
-366.75	-7.4962917752243e-07	-2.48621184479554e-08
-366.83	-9.27390593392062e-08	-3.07757087103639e-09
-366.92	-5.37500659522798e-11	6.56291005845177e-11
-367	-3.26882494279073e-11	3.99125159218663e-11
-367.08	-5.59370227788206e-12	6.82993749524955e-12
-367.17	-7.95677205610461e-11	-2.63316644690128e-12
-367.25	-9.49884484967761e-11	-3.14980425568111e-12
-367.33	-2.0223451831541e-11	-6.70876482073905e-13
-367.42	-2.6291444619519e-13	-8.7263744631477e-15
-367.5	0.00175014454172918	0.00189030474148779
-367.58	0.0119383009101363	0.0128943788798987
-367.67	0.00672075767316707	0.00725898906805149
-367.75	0.0011550503621121	0.00124755248729791
-367.83	0.00539064738504036	-0.00489185461986198
-367.92	0.019688855823268	-0.0178670600095409
-368	0.00700286627232067	-0.00635489604116434
-368.08	0.000718490356027161	-0.000652008954844522
-368.17	7.48316486595807e-07	8.08245358593376e-07
-368.25	2.0864426801808e-07	2.25353529207074e-07
-368.33	1.47149751949782e-08	1.58934229288144e-08
-368.42	1.21758955846941e-06	-1.1049268633712e-06
-368.5	9.34657756758334e-07	-8.48174539863393e-07
-368.58	1.76481682728777e-07	-1.60151958254499e-07
-368.67	5.77578984530396e-11	6.23834360507056e-11
-368.75	2.9982030502773e-11	3.2383140339437e-11
-368.83	4.69259920724516e-12	5.06840667761823e-12
-368.92	2.44538291672634e-18	-4.82674797355233e-18
-369	-4.29046351797947e-18	9.03872621686851e-18
-369.08	0.0146872113562822	-0.0133282141446422
-369.17	0.0134302033688584	-0.0121875162114879
-369.25	0.00287239345083272	-0.0026066129295463
-369.33	4.05588721316143e-05	-3.68059885635131e-05
-369.42	4.61294023844361e-17	5.5782137357689e-17
-369.5	1.07905671810334e-18	-2.3303058213266e-18
-369.58	-3.88442813658074e-19	7.7100982738306e-19
-369.67	1.31510664966202e-06	-1.1934207675309e-06
-369.75	4.64505246761731e-07	-4.21524906933376e-07
-369.83	5.09337724082222e-08	-4.62209067039506e-08
-369.92	1.83448030109031e-18	-4.47583789857748e-18
-370	0.0111766770755257	0.0120717604552685
-370.08	0.0227212264251529	0.0245408542092519
-370.17	0.00760018428350422	0.00820884435557999
-370.25	-0.0129931990351235	0.0166517468988718
-370.33	-0.0692976860215426	0.0866244957684903
-370.42	-0.0412062673414649	0.0555283219867807
-370.5	-0.00647492096824258	0.00900190027612454
-370.58	1.34971812428411e-06	1.45781020319825e-06
-370.67	1.01709302919023e-06	1.09854685128312e-06
-370.75	1.90764585849122e-07	2.06041941444651e-07
-370.83	-2.2046024106503e-06	2.51577598407511e-06
-370.92	-4.78167065636419e-06	6.35533984028642e-06
-371	-1.22787634308334e-06	1.677972278577e-06
-371.08	-6.70284533682139e-08	1.00875998082613e-07
-371.17	1.08143923262253e-10	1.1680460697779e-10
-371.25	3.29189713933979e-11	3.55552821451839e-11
-371.33	2.83558130690691e-12	3.06266222268823e-12
-371.42	-4.02713004924041e-10	5.20561419536236e-10
-371.5	-1.82693119794693e-10	2.46698791288021e-10
-371.58	-2.59642090335595e-11	3.62643069497382e-11
-371.67	7.46409818264703e-15	8.06005341050918e-15
-371.75	4.56479803908281e-15	4.93513977662985e-15
-371.83	7.81814577415801e-16	8.50483361710937e-16
-371.92	-1.37770624093792e-14	1.57203052781668e-14
-372	-2.20755798767375e-14	2.94249143241183e-14
-372.08	-5.21313418297498e-15	7.14161000667491e-15
-372.17	-2.19047332997271e-16	3.38499589768418e-16
-372.25	6.13147978829546e-19	3.1371846428377e-19
-372.33	3.44515265736293e-18	-7.12993684984548e-18
-372.42	-4.3236940159798e-19	9.88278741437464e-19
-372.5	-1.76636283956231e-18	2.12776658998811e-18
-372.58	-4.27461668907222e-18	7.67862642966722e-18
-372.67	-7.36663624295111e-19	1.38716291379613e-18
-372.75	1.14257880924225e-18	-2.34527044918587e-18
-372.83	8.06622521537011e-19	-1.75224011112217e-18
-372.92	9.87787121503794e-19	-1.97397197477403e-18
-373	-3.55122752353804e-19	7.00843895881126e-19
-373.08	-3.35614251753127e-19	6.0980664656083e-19
-373.17	-1.76690778114154e-18	3.59127152763101e-18
-373.25	-5.91744401790956e-19	1.23350403375069e-18
-373.33	6.84297010450532e-19	-1.4214846536637e-18
-373.42	1.84558288083071e-18	-3.46196293196396e-18
-373.5	-1.17290334743368e-18	2.35949795572178e-18
-373.58	1.17727752455709e-19	-2.55923096390749e-19
-373.67	-3.45784020562986e-19	7.12123718454811e-19
-373.75	-2.09216675913892e-18	4.49522060148598e-18
-373.83	-3.49199894568032e-18	7.69142911759801e-18
-373.92	1.79859005876028e-18	-3.54829773705008e-18
-374	-3.17337791761527e-18	6.37979839197957e-18
-374.08	1.70024543128521e-18	-3.38230543897511e-18
-374.17	-4.60154222274639e-19	1.0315521264965e-18
-374.25	-3.98045776340227e-19	8.22162754011522e-19
-374.33	5.22172216332186e-19	-1.0357090709661e-18
-374.42	0.0123062899717611	0.00307831863805758
-374.5	0.0530623521431481	0.0132731170772219
-374.58	0.02582017136285	0.00645870647664635
-374.67	0.00382370652153467	0.000956469177852309
-374.75	1.79762965037032e-18	-3.53468544609475e-18
-374.83	-2.3020378156967e-18	4.72300277433078e-18
-374.92	3.94393827573298e-18	-7.72622591763113e-18
-375	7.20739269112389e-07	1.80287083300603e-07
-375.08	3.07079114362027e-06	7.68133501859148e-07
-375.17	7.49683815815272e-07	1.8752732693447e-07
-375.25	3.30863649990747e-08	8.27628589042413e-09
-375.33	2.18453275779101e-18	-4.37946536015561e-18
-375.42	-1.2863949443943e-18	2.66142756470007e-18
-375.5	1.95868534101192e-18	-3.67592177939966e-18
-375.58	2.71031425497474e-10	6.77963158978864e-11
-375.67	1.1404587577614e-10	2.85276521114298e-11
-375.75	1.51908954391016e-11	3.79988231246055e-12
-375.83	1.78728302323692e-18	-3.7971363093753e-18
-375.92	0.000563229177025213	-0.000511113982212264
-376	0.00734372298287524	-0.00666421352293167
-376.08	0.00634883416170081	-0.00576138105615447
-376.17	0.00139762443069343	-0.00126830323701021
-376.25	2.93644026105098e-05	-2.66473353364689e-05
-376.33	8.25094061025467e-17	1.79271164933086e-17
-376.42	3.99272620897962e-19	-8.39385972683977e-19
-376.5	-1.2757524127838e-18	2.4951965216208e-18
-376.58	6.08989470387114e-07	-5.52640108203986e-07
-376.67	2.22939693280985e-07	-2.02311242156673e-07
-376.75	0.00076472211384694	-0.0243527075378078
-376.83	0.00266433483802901	-0.0848489611801635
-376.92	0.00122602507040224	-0.03904424928866
-377	0.000181973128669668	-0.00579515408872092
-377.08	3.00320687377196e-11	-2.72532219132198e-11
-377.17	2.88837798259145e-11	-2.62111861531615e-11
-377.25	5.84721516266133e-12	-5.30617847672188e-12
-377.33	3.28882706524286e-08	-1.04736662535836e-06
-377.42	1.45680238081749e-07	-4.63936314963802e-06
-377.5	3.56334430551553e-08	-1.13479003592219e-06
-377.58	1.58711577570764e-09	-5.05436190077082e-08
-377.67	2.93206988784313e-15	-2.65901496309319e-15
-377.75	9.71450863334397e-16	-8.81938611933297e-16
-377.83	1.01437697037806e-16	-9.79370148928923e-17
-377.92	1.28358319540466e-11	-4.08772618458493e-10
-378	5.41624451979516e-12	-1.72486972541733e-10
-378.08	7.23317383020947e-13	-2.30349189154351e-11
-378.17	2.78577668268228e-18	-5.78091321784143e-18
-378.25	7.99392727107576e-19	-1.50559858220268e-18
-378.33	1.82012466556999e-18	-3.59054164413801e-18
-378.42	4.04007017413954e-16	-1.2863697508581e-14
-378.5	6.67986336764223e-16	-2.13123547074527e-14
-378.58	1.48979008167846e-16	-4.79353554957763e-15
-378.67	0.00260510114581369	-0.00236405299124451
-378.75	0.00787417585949343	-0.00714558397248161
-378.83	0.00318409081125324	-0.00288946915509719
-378.92	0.000404125833518826	-0.000366732357822099
-379	-4.59563469268199e-18	6.28576615430577e-18
-379.08	9.8041321993319e-19	-2.6103510230313e-18
-379.17	-9.59406845492784e-19	1.87033001803268e-18
-379.25	3.051631341553e-07	-2.76926606580942e-07
-379.33	4.00211052555888e-07	-3.63179808755163e-07
-379.42	-0.00101735364263497	0.00116097058911071
-379.5	-0.0218608923820534	0.0249464976298424
-379.58	-0.0212472607163646	0.0242462531880333
-379.67	-0.00492442986374959	0.00561949960877659
-379.75	-0.000161598108313242	0.000184407237298707
-379.83	3.88156195314443e-11	-3.5224036903282e-11
-379.92	1.39406738326156e-11	-1.26507539969888e-11
-380	1.56245426255599e-12	-1.41788645397193e-12
-380.08	-1.95916225217495e-06	2.23569262112229e-06
-380.17	-7.66946644016398e-07	8.75199055575717e-07
-380.25	-9.50886607747992e-08	1.0851016397538e-07
-380.33	1.99598134441662e-15	-1.8072203732868e-15
-380.42	1.82087578348725e-15	-1.65554255896197e-15
-380.5	3.64509671809699e-16	-3.33462860755598e-16
-380.58	-2.82213127060399e-18	5.5402398487403e-18
-380.67	-0.0067062705234929	0.0076528421819015
-380.75	-0.0101121782727797	0.0115394844520125
-380.83	-0.00287525154898916	0.0032810854051592
-380.92	-0.000213148224635129	0.000243233510901607
-381	-1.66320871016383e-18	2.88571758779382e-18
-381.08	1.79395708477286e-18	-3.85278995156605e-18
-381.17	1.38752698958792e-18	-2.56046024477062e-18
-381.25	-7.62662634075244e-07	8.70310369395838e-07
-381.33	-4.09863651566028e-07	4.6771477985173e-07
-381.42	-6.55432799274085e-08	7.47945338047463e-08
-381.5	-1.01390151071013e-18	1.94802957451162e-18
-381.58	-4.1470814910903e-18	7.78911832075991e-18
-381.67	-1.14437928335996e-19	2.484125936968e-19
-381.75	-8.35261976498389e-19	1.96565963679848e-18
-381.83	-4.71974483940136e-11	5.38592386802912e-11
-381.92	-1.23096937877779e-11	1.40471722174113e-11
-382	-7.10305529367906e-13	8.10564625502719e-13
-382.08	-8.45272955711206e-19	1.67970696965287e-18
-382.17	-2.26593947281912e-19	5.19867040063998e-19
-382.25	1.54465285499921e-18	-3.05762908693465e-18
-382.33	-3.91411545486291e-15	4.46651592039293e-15
-382.42	-1.82084935160286e-15	2.07903909681257e-15
-382.5	-2.64838834925526e-16	3.03406575944357e-16
-382.58	-0.00547561587577714	0.0066857543539538
-382.67	-0.00531810222434551	0.00649342939823058
-382.75	-0.000887087764303104	0.00108313859428404
-382.83	-1.94046475577823e-18	4.37239772220681e-18
-382.92	-4.34034210017288e-19	7.1829928088707e-19
-383	5.1440629415913e-19	-1.19240871864207e-18
-383.08	-0.00590220856749382	0.00720662616284506
-383.17	-0.00954036413741972	0.0116488322988884
-383.25	-0.00259444819898706	0.00316783421920067
-383.33	-0.000170791928120106	0.000208537797930739
-383.42	-2.28059647350106e-18	4.59338357234372e-18
-383.5	-2.26490594295548e-18	4.36646435567296e-18
-383.58	1.73787138288371e-18	-3.7941430529312e-18
-383.67	-7.57325073727446e-07	9.24697700478268e-07
-383.75	-3.76704521556219e-07	4.59958103761554e-07
-383.83	-5.73201962711999e-08	6.99882461565219e-08
-383.92	-1.56385980787693e-18	3.0576080972266e-18
-384	3.48365601494681e-18	-7.24307799364503e-18
-384.08	2.13617502308638e-18	-4.56187109293274e-18
-384.17	-5.58567228234072e-12	6.82013531039525e-12
-384.25	-4.43139209595311e-11	5.41075181317464e-11
-384.33	-1.10678913873113e-11	1.35139503885993e-11
-384.42	-5.41365875368845e-13	6.61008154857867e-13
-384.5	2.64598266802233e-18	-5.26528811505497e-18
-384.58	-6.74088616183476e-19	1.29482830923322e-18
-384.67	3.31256194150342e-19	-7.04262814298567e-19
-384.75	-3.83047056810387e-15	4.67610155656782e-15
-384.83	-1.66420361566888e-15	2.02997528564846e-15
-384.92	-2.2690984910881e-16	2.75267707993928e-16
-385	-3.68128762248511e-18	8.08819622457642e-18
-385.08	6.06075793810752e-19	-1.30876785351839e-18
-385.17	-1.39543183771421e-18	3.08162435573389e-18
-385.25	-1.53193711796797e-18	3.09562531817954e-18
-385.33	-1.68711337037426e-18	3.27296033040415e-18
-385.42	-6.01556004626754e-19	1.2299118985431e-18
-385.5	2.29914992138312e-18	-4.53046221789349e-18
-385.58	1.86545354921478e-18	-3.78565897158097e-18
-385.67	-1.37309714691936e-18	2.84129085446694e-18
-385.75	2.55381197446768e-18	-5.44267182753814e-18
-385.83	-9.41791174856112e-19	2.07093915265875e-18
-385.92	1.01691695562792e-18	-2.00872855314986e-18
-386	7.27230204557963e-19	-1.60305498572094e-18
-386.08	1.43358447718071e-18	-2.85011501044651e-18
-386.17	4.10460225758045e-19	-9.25344617386533e-19
-386.25	-1.63062853445251e-18	3.11384169642434e-18
-386.33	-8.68125348478412e-19	1.91807679584441e-18
-386.42	4.25836193410717e-19	-8.82624409362137e-19
-386.5	-1.69079350338186e-18	3.56212375079617e-18
-386.58	5.93555704583929e-05	-0.0044137682306415
-386.67	-0.00632408750279951	-0.0535115057453083
-386.75	-0.014105633055698	-0.0407107818399712
-386.83	-0.00406011861940147	-0.00938762379241897
-386.92	8.54060043273095e-05	-0.0128886183967909
-387	0.00330092261016036	-0.105121867721181
-387.08	0.00239100052284525	-0.0761442997512755
-387.17	0.00473929636508397	-0.150928617365443
-387.25	0.0039082820128024	-0.124501110254496
-387.33	0.00100919017042898	-0.0321586849470848
-387.42	-0.00861182660086414	0.00809798707905663
-387.5	-0.0214436117709636	0.0244703186544997
-387.58	-0.0076645340749596	0.00798398507472321
-387.67	-0.0136962922244849	0.000987522090785407
-387.75	-0.0121027914791598	0.000244994103399715
-387.83	-0.00235330255381355	4.48935266480473e-05
-387.92	2.14362921668096e-08	-6.83258100211957e-07
-388	-1.51264601452843e-06	1.7261522867753e-06
-388.08	-9.61725356188431e-07	1.09747024780367e-06
-388.17	-1.68136484243626e-07	1.91868487025943e-07
-388.25	-1.26023992643564e-06	2.63870472165116e-08
-388.33	-3.98746242906655e-07	7.84021374671939e-09
-388.42	-3.69216455915522e-08	6.42674444055602e-10
-388.5	1.63481030952286e-13	-5.21898800369364e-12
-388.58	-1.06166330521364e-10	1.21151418350274e-10
-388.67	-3.00942372371905e-11	3.43419547716058e-11
-388.75	-8.43528941339633e-11	4.26000349990741e-12
-388.83	-5.44895550084399e-11	1.0979720545396e-12
-388.92	-9.71064049485535e-12	1.83903717824418e-13
-389	8.78650572565616e-17	-2.7068040874858e-15
-389.08	-8.03511455811547e-15	9.16784195217041e-15
-389.17	-4.29559182697872e-15	4.90215579959687e-15
-389.25	-6.86218797183736e-16	7.84610856481141e-16
-389.33	-5.95478935122529e-15	1.20740326459013e-16
-389.42	-1.7203955895226e-15	3.32283267933927e-17
-389.5	-1.32989068353453e-16	3.24187066953316e-18
-389.58	-3.50654302974629e-18	7.26873362072882e-18
-389.67	1.19418024870848e-18	-3.37356182970769e-18
-389.75	2.98203688938846e-18	-6.22490303201473e-18
-389.83	3.02152857270797e-18	-6.52550646367594e-18
-389.92	-1.34358486777773e-18	2.19781795697521e-18
-390	7.52069123265004e-20	-2.41112608468746e-19
-390.08	-0.00128767480290404	2.71745489722797e-05
-390.17	-0.0186924984880098	0.000394478648204537
-390.25	-0.0130428620963781	0.000275251091329377
-390.33	-0.00259893776349149	5.48468925311124e-05
-390.42	-4.53842780886484e-20	8.38121594805947e-20
-390.5	1.21156504548137e-18	-2.47727524005953e-18
-390.58	-2.34241370339224e-18	4.53609945376804e-18
-390.67	7.822927195723e-19	-1.59987292530202e-18
-390.75	-1.33805865234483e-06	2.82378286017441e-08
-390.83	-4.35021057365685e-07	9.18050194158031e-09
-390.92	-4.21879771157718e-08	8.90317382384268e-10
-391	-0.00177787132035486	3.75194506815188e-05
-391.08	-0.0205151999361682	0.000432944175100855
-391.17	-0.014995252502239	0.000316453519595749
-391.25	-0.00225591977536141	4.76079847759942e-05
-391.33	3.904618128993e-18	-8.4421457747121e-18
-391.42	-3.28464112877977e-18	7.19695667743576e-18
-391.5	-1.98308107508757e-18	4.30678544582637e-18
-391.58	-3.05267171544501e-07	6.44223035222023e-09
-391.67	-1.77212615537008e-06	3.73982071306861e-08
-391.75	-4.38370832790379e-07	9.25119419763e-09
-391.83	-2.05640560559928e-08	4.3397520951759e-10
-391.92	-2.56362661460729e-18	5.67127559752636e-18
-392	-0.0366693809680357	0.000773855236315611
-392.08	-0.0301296427150324	0.000635843343078808
-392.17	-0.00569151230718601	0.000120111288633694
-392.25	1.83670440881171e-18	-3.63278100173257e-18
-392.33	1.95132420904203e-18	-4.30198996962267e-18
-392.42	9.22715393113378e-20	-1.87497565822323e-19
-392.5	-1.07908615086974e-18	2.36126191837805e-18
-392.58	-3.19066511849721e-06	6.73344584530094e-08
-392.67	-9.78580475735892e-07	2.06515519326383e-08
-392.75	-0.019518861642084	0.0222737995218899
-392.83	-0.0417813461278738	0.0476786683364337
-392.92	-0.0121123507022801	0.0138219757243128
-393	-0.000787116252328789	0.000898215548683922
-393.08	-2.17857665528675e-10	4.59757393660785e-12
-393.17	-1.35343719858349e-10	2.85623546721038e-12
-393.25	-2.34036390405774e-11	4.93900212123262e-13
-393.33	-3.56838704124608e-06	4.07205506770384e-06
-393.42	-1.76198360856187e-06	2.01068275372772e-06
-393.5	-0.00233992195400915	0.00360244123900651
-393.58	-0.0224309026287285	0.0345346530641351
-393.67	-0.0144781756530043	0.0222906220696274
-393.75	-0.0026549293256643	0.00408753337701366
-393.83	-3.04582339785289e-11	3.47569898364536e-11
-393.92	-2.07692010278724e-10	2.37007166468918e-10
-394	0.000989421728722559	-0.0315093316645265
-394.08	0.00166917857982581	-0.0531570081597263
-394.17	0.000515223006487019	-0.0164551396233416
-394.25	4.55292483933701e-05	-0.00146398008581852
-394.33	-3.80471565270782e-08	5.85774621944284e-08
-394.42	-1.80262500024233e-14	2.05689490369655e-14
-394.5	-7.7909656610118e-15	8.88828831877814e-15
-394.58	1.12421356224445e-07	-3.58019391594558e-06
-394.67	7.11020518802956e-08	-2.26769779930263e-06
-394.75	0.000316047453349314	-0.0100649148736834
-394.83	0.00229889763821647	-0.073211172468377
-394.92	0.00150372971795886	-0.0478880892309078
-395	0.000292705972843111	-0.00932157526617029
-395.08	-0.00875103820451387	0.00998622320294566
-395.17	-0.0126456283855077	0.0144305240873075
-395.25	-0.00378465244012699	0.00431884573343672
-395.33	-0.000315001652628076	0.000359463270406603
-395.42	1.56478579106423e-07	-4.9832493669199e-06
-395.5	4.95699913407887e-08	-1.57861625005459e-06
-395.58	4.59965931477345e-09	-1.46481706778349e-07
-395.67	-8.93363646461732e-07	1.01945947057533e-06
-395.75	-5.28499859979223e-07	6.03096163123705e-07
-395.83	0.0101721470821755	0.00254460417531899
-395.92	0.0901124169298955	0.0225408899978156
-396	0.0619057408174025	0.0154852188209358
-396.08	0.0120686207083509	0.00301886756043136
-396.17	2.13427762585755e-18	-4.57591641293874e-18
-396.25	-5.93693477596822e-11	6.77491676579856e-11
-396.33	-1.62663136152525e-11	1.85622572248383e-11
-396.42	-1.09391652965735e-12	1.24832003417318e-12
-396.5	6.43609376126285e-06	1.60993663686421e-06
-396.58	2.04220500508587e-06	5.10841013808235e-07
-396.67	1.90042568568878e-07	4.75376068364845e-08
-396.75	-4.67251518868319e-15	5.33097853187915e-15
-396.83	-2.35613979840554e-15	2.69012387669633e-15
-396.92	-3.61561868840093e-16	4.1275441396577e-16
-397	0.00683320944088087	0.00170927192743568
-397.08	0.0508156173515183	0.0127111145890864
-397.17	0.0315399671799999	0.00788946701538054
-397.25	0.00571098525966419	0.00142855664922875
-397.33	4.89969485396192e-19	-1.19060334525639e-18
-397.42	2.22834919338454e-18	-4.34732897976762e-18
-397.5	8.31147483196322e-19	-1.78218120586324e-18
-397.58	7.14897520004991e-19	-1.54051878724343e-18
-397.67	3.41887735034728e-06	8.55204443656831e-07
-397.75	1.0035305688935e-06	2.51025033637385e-07
-397.83	8.01158365214818e-08	2.00403268096558e-08
-397.92	-1.9142113485302e-18	3.69209812345875e-18
-398	-2.33556706483865e-18	4.5182654397614e-18
-398.08	-0.00206607196679601	0.00235769234822122
-398.17	-0.0225874349565933	0.0257755896848458
-398.25	-0.0160218359330536	0.0182832742502864
-398.33	-0.0026940895995632	0.00307435297682499
-398.42	-3.76104775049341e-18	8.41246115765971e-18
-398.5	2.39548120740311e-20	-5.08280982949083e-20
-398.58	5.66389784439603e-19	-1.12520168973942e-18
-398.67	0.00295354336564466	0.0016465989339032
-398.75	0.100753555082997	0.0424027103707126
-398.83	0.0858729519853825	0.0359862357359944
-398.92	0.0173733382364934	0.00713147150476632
-399	4.58678491672166e-19	-1.05711764259232e-18
-399.08	-3.74124159573477e-18	8.10123796770424e-18
-399.17	1.44107919235719e-18	-2.94492407411307e-18
-399.25	-2.28306806332197e-18	4.56015944945022e-18
-399.33	8.7259811334237e-06	3.70432674670869e-06
-399.42	2.88619885891337e-06	1.19693828706317e-06
-399.5	2.87745593745991e-07	1.14900342939911e-07
-399.58	3.43909756603207e-18	-7.1235425369153e-18
-399.67	5.41775952563231e-19	-1.17632377804067e-18
-399.75	-2.94880449307325e-20	5.68563417987762e-20
-399.83	5.28798133253926e-10	2.33513647021011e-10
-399.92	3.87854520523766e-10	1.62263513454245e-10
Binary file test-data/out3.ibd has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/out3.imzml	Fri Feb 15 10:21:09 2019 -0500
@@ -0,0 +1,151 @@
+<?xml version="1.0"?>
+<mzML version="1.1" xmlns="http://psi.hupo.org/ms/mzml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://psi.hupo.org/ms/mzml http://psidev.info/files/ms/mzML/xsd/mzML1.1.0_idx.xsd">
+	<cvList count="3">
+		<cv id="MS" fullName="Proteomics Standards Initiative Mass Spectrometry Ontology" version="1.3.1" URI="http://psidev.info/ms/mzML/psi-ms.obo" />
+		<cv id="UO" fullName="Unit Ontology" version="1.15" URI="http://obo.cvs.sourceforge.net/obo/obo/ontology/phenotype/unit.obo" />
+		<cv id="IMS" fullName="Imaging MS Ontology" version="0.9.1" URI="http://www.maldi-msi.org/download/imzml/imagingMS.obo" />
+	</cvList>
+	<fileDescription>
+		<fileContent>
+			<cvParam cvRef="MS" accession="MS:1000579" name="MS1 spectrum" value="" />
+			<cvParam cvRef="MS" accession="MS:1000128" name="profile spectrum" value="" />
+			<cvParam cvRef="IMS" accession="IMS:1000080" name="universally unique identifier" value="{AEDF2DEE-A321-4DAF-B971-943AE2AF79A6}" />
+			<cvParam cvRef="IMS" accession="IMS:1000091" name="ibd SHA-1" value="8311A159EC925605745E409F14BB6C570FF59ACA" />
+			<cvParam cvRef="IMS" accession="IMS:1000030" name="continuous" value="" />
+		</fileContent>
+	</fileDescription>
+	<referenceableParamGroupList count="4">
+		<referenceableParamGroup id="spectrum1">
+			<cvParam cvRef="MS" accession="MS:1000579" name="MS1 spectrum" value="" />
+			<cvParam cvRef="MS" accession="MS:1000511" name="ms level" value="0" />
+			<cvParam cvRef="MS" accession="MS:1000128" name="profile spectrum" value="" />
+		</referenceableParamGroup>
+		<referenceableParamGroup id="scan1">
+			<cvParam cvRef="MS" accession="MS:1000093" name="increasing m/z scan" value="" />
+			<cvParam cvRef="MS" accession="MS:1000095" name="linear" value="" />
+		</referenceableParamGroup>
+		<referenceableParamGroup id="mzArray">
+			<cvParam cvRef="MS" accession="MS:1000576" name="no compression" value="" />
+			<cvParam cvRef="MS" accession="MS:1000514" name="m/z array" value="" unitCvRef="MS" unitAccession="MS:1000040" unitName="m/z" />
+			<cvParam cvRef="IMS" accession="IMS:1000101" name="external data" value="true" />
+			<cvParam cvRef="MS" accession="MS:1000521" name="32-bit float" value="32-bit float" />
+		</referenceableParamGroup>
+		<referenceableParamGroup id="intensityArray">
+			<cvParam cvRef="MS" accession="MS:1000576" name="no compression" value="" />
+			<cvParam cvRef="MS" accession="MS:1000515" name="intensity array" value="" unitCvRef="MS" unitAccession="MS:1000131" unitName="number of counts" />
+			<cvParam cvRef="IMS" accession="IMS:1000101" name="external data" value="true" />
+			<cvParam cvRef="MS" accession="MS:1000521" name="32-bit float" value="32-bit float" />
+		</referenceableParamGroup>
+	</referenceableParamGroupList>
+	<sampleList count="1">
+		<sample id="sample1" name="Sample1">
+			<cvParam cvRef="MS" accession="MS:1000001" name="sample number" value="1" />
+		</sample>
+	</sampleList>
+	<softwareList count="1">
+		<software id="Cardinal" version="1.12.1">
+			<cvParam cvRef="MS" accession="MS:1000799" name="custom unreleased software tool" value="" />
+		</software>
+	</softwareList>
+	<scanSettingsList count="1">
+		<scanSettings id="scansettings1">
+			<cvParam cvRef="IMS" accession="IMS:1000042" name="max count of pixel x" value="3" />
+			<cvParam cvRef="IMS" accession="IMS:1000043" name="max count of pixel y" value="2" />
+		</scanSettings>
+	</scanSettingsList>
+	<instrumentConfigurationList count="1">
+		<instrumentConfiguration id="IC1" />
+	</instrumentConfigurationList>
+	<dataProcessingList count="1">
+		<dataProcessing id="CardinalWriteImzML">
+			<processingMethod order="1" softwareRef="Cardinal">
+				<cvParam cvRef="MS" accession="MS:1000544" name="Conversion to mzML" value="" />
+			</processingMethod>
+		</dataProcessing>
+	</dataProcessingList>
+	<run defaultInstrumentConfigurationRef="IC1" id="Experiment01" sampleRef="sample1">
+		<spectrumList count="3" defaultDataProcessingRef="CardinalWriteImzML">
+			<spectrum id="Spectrum=1" defaultArrayLength="0" index="1">
+				<referenceableParamGroupRef ref="spectrum1" />
+				<scanList count="1">
+					<cvParam cvRef="MS" accession="MS:1000795" name="no combination" value="" />
+					<scan instrumentConfigurationRef="IC1">
+						<referenceableParamGroupRef ref="scan1" />
+						<cvParam cvRef="IMS" accession="IMS:1000050" name="position x" value="1" />
+						<cvParam cvRef="IMS" accession="IMS:1000051" name="position y" value="2" />
+					</scan>
+				</scanList>
+				<binaryDataArrayList count="2">
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="mzArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="16" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="600" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="2400" />
+						<binary />
+					</binaryDataArray>
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="intensityArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="2416" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="600" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="2400" />
+						<binary />
+					</binaryDataArray>
+				</binaryDataArrayList>
+			</spectrum>
+			<spectrum id="Spectrum=2" defaultArrayLength="0" index="2">
+				<referenceableParamGroupRef ref="spectrum1" />
+				<scanList count="1">
+					<cvParam cvRef="MS" accession="MS:1000795" name="no combination" value="" />
+					<scan instrumentConfigurationRef="IC1">
+						<referenceableParamGroupRef ref="scan1" />
+						<cvParam cvRef="IMS" accession="IMS:1000050" name="position x" value="2" />
+						<cvParam cvRef="IMS" accession="IMS:1000051" name="position y" value="2" />
+					</scan>
+				</scanList>
+				<binaryDataArrayList count="2">
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="mzArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="16" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="600" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="2400" />
+						<binary />
+					</binaryDataArray>
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="intensityArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="4816" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="600" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="2400" />
+						<binary />
+					</binaryDataArray>
+				</binaryDataArrayList>
+			</spectrum>
+			<spectrum id="Spectrum=3" defaultArrayLength="0" index="3">
+				<referenceableParamGroupRef ref="spectrum1" />
+				<scanList count="1">
+					<cvParam cvRef="MS" accession="MS:1000795" name="no combination" value="" />
+					<scan instrumentConfigurationRef="IC1">
+						<referenceableParamGroupRef ref="scan1" />
+						<cvParam cvRef="IMS" accession="IMS:1000050" name="position x" value="3" />
+						<cvParam cvRef="IMS" accession="IMS:1000051" name="position y" value="2" />
+					</scan>
+				</scanList>
+				<binaryDataArrayList count="2">
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="mzArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="16" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="600" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="2400" />
+						<binary />
+					</binaryDataArray>
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="intensityArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="7216" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="600" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="2400" />
+						<binary />
+					</binaryDataArray>
+				</binaryDataArrayList>
+			</spectrum>
+		</spectrumList>
+	</run>
+</mzML>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/out3.imzml.txt	Fri Feb 15 10:21:09 2019 -0500
@@ -0,0 +1,4 @@
+imzML file:
+total 24
+-rw-r--r-- 1 meli meli 9616 Feb 12 19:18 ibd
+-rw-r--r-- 1 meli meli 8282 Feb 12 19:18 imzml
Binary file test-data/out4.ibd has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/out4.imzml	Fri Feb 15 10:21:09 2019 -0500
@@ -0,0 +1,205 @@
+<?xml version="1.0"?>
+<mzML version="1.1" xmlns="http://psi.hupo.org/ms/mzml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://psi.hupo.org/ms/mzml http://psidev.info/files/ms/mzML/xsd/mzML1.1.0_idx.xsd">
+	<cvList count="3">
+		<cv id="MS" fullName="Proteomics Standards Initiative Mass Spectrometry Ontology" version="1.3.1" URI="http://psidev.info/ms/mzML/psi-ms.obo" />
+		<cv id="UO" fullName="Unit Ontology" version="1.15" URI="http://obo.cvs.sourceforge.net/obo/obo/ontology/phenotype/unit.obo" />
+		<cv id="IMS" fullName="Imaging MS Ontology" version="0.9.1" URI="http://www.maldi-msi.org/download/imzml/imagingMS.obo" />
+	</cvList>
+	<fileDescription>
+		<fileContent>
+			<cvParam cvRef="MS" accession="MS:1000579" name="MS1 spectrum" value="" />
+			<cvParam cvRef="MS" accession="MS:1000128" name="profile spectrum" value="" />
+			<cvParam cvRef="IMS" accession="IMS:1000080" name="universally unique identifier" value="{2567A8C4-D2AF-4C81-874C-82E9134A080C}" />
+			<cvParam cvRef="IMS" accession="IMS:1000091" name="ibd SHA-1" value="EA722C9CF5A229ACF6AEAD177908D73A1C8CB44E" />
+			<cvParam cvRef="IMS" accession="IMS:1000030" name="continuous" value="" />
+		</fileContent>
+	</fileDescription>
+	<referenceableParamGroupList count="4">
+		<referenceableParamGroup id="spectrum1">
+			<cvParam cvRef="MS" accession="MS:1000579" name="MS1 spectrum" value="" />
+			<cvParam cvRef="MS" accession="MS:1000511" name="ms level" value="0" />
+			<cvParam cvRef="MS" accession="MS:1000128" name="profile spectrum" value="" />
+		</referenceableParamGroup>
+		<referenceableParamGroup id="scan1">
+			<cvParam cvRef="MS" accession="MS:1000093" name="increasing m/z scan" value="" />
+			<cvParam cvRef="MS" accession="MS:1000095" name="linear" value="" />
+		</referenceableParamGroup>
+		<referenceableParamGroup id="mzArray">
+			<cvParam cvRef="MS" accession="MS:1000576" name="no compression" value="" />
+			<cvParam cvRef="MS" accession="MS:1000514" name="m/z array" value="" unitCvRef="MS" unitAccession="MS:1000040" unitName="m/z" />
+			<cvParam cvRef="IMS" accession="IMS:1000101" name="external data" value="true" />
+			<cvParam cvRef="MS" accession="MS:1000521" name="32-bit float" value="32-bit float" />
+		</referenceableParamGroup>
+		<referenceableParamGroup id="intensityArray">
+			<cvParam cvRef="MS" accession="MS:1000576" name="no compression" value="" />
+			<cvParam cvRef="MS" accession="MS:1000515" name="intensity array" value="" unitCvRef="MS" unitAccession="MS:1000131" unitName="number of counts" />
+			<cvParam cvRef="IMS" accession="IMS:1000101" name="external data" value="true" />
+			<cvParam cvRef="MS" accession="MS:1000521" name="32-bit float" value="32-bit float" />
+		</referenceableParamGroup>
+	</referenceableParamGroupList>
+	<sampleList count="1">
+		<sample id="sample1" name="Sample1">
+			<cvParam cvRef="MS" accession="MS:1000001" name="sample number" value="1" />
+		</sample>
+	</sampleList>
+	<softwareList count="1">
+		<software id="Cardinal" version="1.12.1">
+			<cvParam cvRef="MS" accession="MS:1000799" name="custom unreleased software tool" value="" />
+		</software>
+	</softwareList>
+	<scanSettingsList count="1">
+		<scanSettings id="scansettings1">
+			<cvParam cvRef="IMS" accession="IMS:1000042" name="max count of pixel x" value="3" />
+			<cvParam cvRef="IMS" accession="IMS:1000043" name="max count of pixel y" value="3" />
+		</scanSettings>
+	</scanSettingsList>
+	<instrumentConfigurationList count="1">
+		<instrumentConfiguration id="IC1" />
+	</instrumentConfigurationList>
+	<dataProcessingList count="1">
+		<dataProcessing id="CardinalWriteImzML">
+			<processingMethod order="1" softwareRef="Cardinal">
+				<cvParam cvRef="MS" accession="MS:1000544" name="Conversion to mzML" value="" />
+			</processingMethod>
+		</dataProcessing>
+	</dataProcessingList>
+	<run defaultInstrumentConfigurationRef="IC1" id="Experiment01" sampleRef="sample1">
+		<spectrumList count="5" defaultDataProcessingRef="CardinalWriteImzML">
+			<spectrum id="Spectrum=1" defaultArrayLength="0" index="1">
+				<referenceableParamGroupRef ref="spectrum1" />
+				<scanList count="1">
+					<cvParam cvRef="MS" accession="MS:1000795" name="no combination" value="" />
+					<scan instrumentConfigurationRef="IC1">
+						<referenceableParamGroupRef ref="scan1" />
+						<cvParam cvRef="IMS" accession="IMS:1000050" name="position x" value="1" />
+						<cvParam cvRef="IMS" accession="IMS:1000051" name="position y" value="1" />
+					</scan>
+				</scanList>
+				<binaryDataArrayList count="2">
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="mzArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="16" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="1199" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="4796" />
+						<binary />
+					</binaryDataArray>
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="intensityArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="4812" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="1199" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="4796" />
+						<binary />
+					</binaryDataArray>
+				</binaryDataArrayList>
+			</spectrum>
+			<spectrum id="Spectrum=2" defaultArrayLength="0" index="2">
+				<referenceableParamGroupRef ref="spectrum1" />
+				<scanList count="1">
+					<cvParam cvRef="MS" accession="MS:1000795" name="no combination" value="" />
+					<scan instrumentConfigurationRef="IC1">
+						<referenceableParamGroupRef ref="scan1" />
+						<cvParam cvRef="IMS" accession="IMS:1000050" name="position x" value="3" />
+						<cvParam cvRef="IMS" accession="IMS:1000051" name="position y" value="1" />
+					</scan>
+				</scanList>
+				<binaryDataArrayList count="2">
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="mzArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="16" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="1199" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="4796" />
+						<binary />
+					</binaryDataArray>
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="intensityArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="9608" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="1199" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="4796" />
+						<binary />
+					</binaryDataArray>
+				</binaryDataArrayList>
+			</spectrum>
+			<spectrum id="Spectrum=3" defaultArrayLength="0" index="3">
+				<referenceableParamGroupRef ref="spectrum1" />
+				<scanList count="1">
+					<cvParam cvRef="MS" accession="MS:1000795" name="no combination" value="" />
+					<scan instrumentConfigurationRef="IC1">
+						<referenceableParamGroupRef ref="scan1" />
+						<cvParam cvRef="IMS" accession="IMS:1000050" name="position x" value="1" />
+						<cvParam cvRef="IMS" accession="IMS:1000051" name="position y" value="2" />
+					</scan>
+				</scanList>
+				<binaryDataArrayList count="2">
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="mzArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="16" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="1199" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="4796" />
+						<binary />
+					</binaryDataArray>
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="intensityArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="14404" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="1199" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="4796" />
+						<binary />
+					</binaryDataArray>
+				</binaryDataArrayList>
+			</spectrum>
+			<spectrum id="Spectrum=4" defaultArrayLength="0" index="4">
+				<referenceableParamGroupRef ref="spectrum1" />
+				<scanList count="1">
+					<cvParam cvRef="MS" accession="MS:1000795" name="no combination" value="" />
+					<scan instrumentConfigurationRef="IC1">
+						<referenceableParamGroupRef ref="scan1" />
+						<cvParam cvRef="IMS" accession="IMS:1000050" name="position x" value="3" />
+						<cvParam cvRef="IMS" accession="IMS:1000051" name="position y" value="2" />
+					</scan>
+				</scanList>
+				<binaryDataArrayList count="2">
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="mzArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="16" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="1199" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="4796" />
+						<binary />
+					</binaryDataArray>
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="intensityArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="19200" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="1199" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="4796" />
+						<binary />
+					</binaryDataArray>
+				</binaryDataArrayList>
+			</spectrum>
+			<spectrum id="Spectrum=5" defaultArrayLength="0" index="5">
+				<referenceableParamGroupRef ref="spectrum1" />
+				<scanList count="1">
+					<cvParam cvRef="MS" accession="MS:1000795" name="no combination" value="" />
+					<scan instrumentConfigurationRef="IC1">
+						<referenceableParamGroupRef ref="scan1" />
+						<cvParam cvRef="IMS" accession="IMS:1000050" name="position x" value="1" />
+						<cvParam cvRef="IMS" accession="IMS:1000051" name="position y" value="3" />
+					</scan>
+				</scanList>
+				<binaryDataArrayList count="2">
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="mzArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="16" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="1199" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="4796" />
+						<binary />
+					</binaryDataArray>
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="intensityArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="23996" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="1199" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="4796" />
+						<binary />
+					</binaryDataArray>
+				</binaryDataArrayList>
+			</spectrum>
+		</spectrumList>
+	</run>
+</mzML>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/out4.imzml.txt	Fri Feb 15 10:21:09 2019 -0500
@@ -0,0 +1,4 @@
+imzML file:
+total 44
+-rw-r--r-- 1 meli meli 28792 Feb 12 00:49 ibd
+-rw-r--r-- 1 meli meli 11141 Feb 12 00:49 imzml
Binary file test-data/out5.ibd has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/out5.imzml	Fri Feb 15 10:21:09 2019 -0500
@@ -0,0 +1,232 @@
+<?xml version="1.0"?>
+<mzML version="1.1" xmlns="http://psi.hupo.org/ms/mzml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://psi.hupo.org/ms/mzml http://psidev.info/files/ms/mzML/xsd/mzML1.1.0_idx.xsd">
+	<cvList count="3">
+		<cv id="MS" fullName="Proteomics Standards Initiative Mass Spectrometry Ontology" version="1.3.1" URI="http://psidev.info/ms/mzML/psi-ms.obo" />
+		<cv id="UO" fullName="Unit Ontology" version="1.15" URI="http://obo.cvs.sourceforge.net/obo/obo/ontology/phenotype/unit.obo" />
+		<cv id="IMS" fullName="Imaging MS Ontology" version="0.9.1" URI="http://www.maldi-msi.org/download/imzml/imagingMS.obo" />
+	</cvList>
+	<fileDescription>
+		<fileContent>
+			<cvParam cvRef="MS" accession="MS:1000579" name="MS1 spectrum" value="" />
+			<cvParam cvRef="MS" accession="MS:1000128" name="profile spectrum" value="" />
+			<cvParam cvRef="IMS" accession="IMS:1000080" name="universally unique identifier" value="{CC0B2B92-FB40-42C8-822F-834AA528954C}" />
+			<cvParam cvRef="IMS" accession="IMS:1000091" name="ibd SHA-1" value="0B644915E88274BE83FBB110D4CC6D0CDFABAAAC" />
+			<cvParam cvRef="IMS" accession="IMS:1000030" name="continuous" value="" />
+		</fileContent>
+	</fileDescription>
+	<referenceableParamGroupList count="4">
+		<referenceableParamGroup id="spectrum1">
+			<cvParam cvRef="MS" accession="MS:1000579" name="MS1 spectrum" value="" />
+			<cvParam cvRef="MS" accession="MS:1000511" name="ms level" value="0" />
+			<cvParam cvRef="MS" accession="MS:1000128" name="profile spectrum" value="" />
+		</referenceableParamGroup>
+		<referenceableParamGroup id="scan1">
+			<cvParam cvRef="MS" accession="MS:1000093" name="increasing m/z scan" value="" />
+			<cvParam cvRef="MS" accession="MS:1000095" name="linear" value="" />
+		</referenceableParamGroup>
+		<referenceableParamGroup id="mzArray">
+			<cvParam cvRef="MS" accession="MS:1000576" name="no compression" value="" />
+			<cvParam cvRef="MS" accession="MS:1000514" name="m/z array" value="" unitCvRef="MS" unitAccession="MS:1000040" unitName="m/z" />
+			<cvParam cvRef="IMS" accession="IMS:1000101" name="external data" value="true" />
+			<cvParam cvRef="MS" accession="MS:1000521" name="32-bit float" value="32-bit float" />
+		</referenceableParamGroup>
+		<referenceableParamGroup id="intensityArray">
+			<cvParam cvRef="MS" accession="MS:1000576" name="no compression" value="" />
+			<cvParam cvRef="MS" accession="MS:1000515" name="intensity array" value="" unitCvRef="MS" unitAccession="MS:1000131" unitName="number of counts" />
+			<cvParam cvRef="IMS" accession="IMS:1000101" name="external data" value="true" />
+			<cvParam cvRef="MS" accession="MS:1000521" name="32-bit float" value="32-bit float" />
+		</referenceableParamGroup>
+	</referenceableParamGroupList>
+	<sampleList count="1">
+		<sample id="sample1" name="Sample1">
+			<cvParam cvRef="MS" accession="MS:1000001" name="sample number" value="1" />
+		</sample>
+	</sampleList>
+	<softwareList count="1">
+		<software id="Cardinal" version="1.12.1">
+			<cvParam cvRef="MS" accession="MS:1000799" name="custom unreleased software tool" value="" />
+		</software>
+	</softwareList>
+	<scanSettingsList count="1">
+		<scanSettings id="scansettings1">
+			<cvParam cvRef="IMS" accession="IMS:1000042" name="max count of pixel x" value="3" />
+			<cvParam cvRef="IMS" accession="IMS:1000043" name="max count of pixel y" value="3" />
+		</scanSettings>
+	</scanSettingsList>
+	<instrumentConfigurationList count="1">
+		<instrumentConfiguration id="IC1" />
+	</instrumentConfigurationList>
+	<dataProcessingList count="1">
+		<dataProcessing id="CardinalWriteImzML">
+			<processingMethod order="1" softwareRef="Cardinal">
+				<cvParam cvRef="MS" accession="MS:1000544" name="Conversion to mzML" value="" />
+			</processingMethod>
+		</dataProcessing>
+	</dataProcessingList>
+	<run defaultInstrumentConfigurationRef="IC1" id="Experiment01" sampleRef="sample1">
+		<spectrumList count="6" defaultDataProcessingRef="CardinalWriteImzML">
+			<spectrum id="Spectrum=1" defaultArrayLength="0" index="1">
+				<referenceableParamGroupRef ref="spectrum1" />
+				<scanList count="1">
+					<cvParam cvRef="MS" accession="MS:1000795" name="no combination" value="" />
+					<scan instrumentConfigurationRef="IC1">
+						<referenceableParamGroupRef ref="scan1" />
+						<cvParam cvRef="IMS" accession="IMS:1000050" name="position x" value="1" />
+						<cvParam cvRef="IMS" accession="IMS:1000051" name="position y" value="2" />
+					</scan>
+				</scanList>
+				<binaryDataArrayList count="2">
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="mzArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="16" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="13" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="52" />
+						<binary />
+					</binaryDataArray>
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="intensityArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="68" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="13" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="52" />
+						<binary />
+					</binaryDataArray>
+				</binaryDataArrayList>
+			</spectrum>
+			<spectrum id="Spectrum=2" defaultArrayLength="0" index="2">
+				<referenceableParamGroupRef ref="spectrum1" />
+				<scanList count="1">
+					<cvParam cvRef="MS" accession="MS:1000795" name="no combination" value="" />
+					<scan instrumentConfigurationRef="IC1">
+						<referenceableParamGroupRef ref="scan1" />
+						<cvParam cvRef="IMS" accession="IMS:1000050" name="position x" value="2" />
+						<cvParam cvRef="IMS" accession="IMS:1000051" name="position y" value="2" />
+					</scan>
+				</scanList>
+				<binaryDataArrayList count="2">
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="mzArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="16" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="13" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="52" />
+						<binary />
+					</binaryDataArray>
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="intensityArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="120" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="13" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="52" />
+						<binary />
+					</binaryDataArray>
+				</binaryDataArrayList>
+			</spectrum>
+			<spectrum id="Spectrum=3" defaultArrayLength="0" index="3">
+				<referenceableParamGroupRef ref="spectrum1" />
+				<scanList count="1">
+					<cvParam cvRef="MS" accession="MS:1000795" name="no combination" value="" />
+					<scan instrumentConfigurationRef="IC1">
+						<referenceableParamGroupRef ref="scan1" />
+						<cvParam cvRef="IMS" accession="IMS:1000050" name="position x" value="3" />
+						<cvParam cvRef="IMS" accession="IMS:1000051" name="position y" value="2" />
+					</scan>
+				</scanList>
+				<binaryDataArrayList count="2">
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="mzArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="16" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="13" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="52" />
+						<binary />
+					</binaryDataArray>
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="intensityArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="172" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="13" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="52" />
+						<binary />
+					</binaryDataArray>
+				</binaryDataArrayList>
+			</spectrum>
+			<spectrum id="Spectrum=4" defaultArrayLength="0" index="4">
+				<referenceableParamGroupRef ref="spectrum1" />
+				<scanList count="1">
+					<cvParam cvRef="MS" accession="MS:1000795" name="no combination" value="" />
+					<scan instrumentConfigurationRef="IC1">
+						<referenceableParamGroupRef ref="scan1" />
+						<cvParam cvRef="IMS" accession="IMS:1000050" name="position x" value="1" />
+						<cvParam cvRef="IMS" accession="IMS:1000051" name="position y" value="3" />
+					</scan>
+				</scanList>
+				<binaryDataArrayList count="2">
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="mzArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="16" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="13" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="52" />
+						<binary />
+					</binaryDataArray>
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="intensityArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="224" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="13" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="52" />
+						<binary />
+					</binaryDataArray>
+				</binaryDataArrayList>
+			</spectrum>
+			<spectrum id="Spectrum=5" defaultArrayLength="0" index="5">
+				<referenceableParamGroupRef ref="spectrum1" />
+				<scanList count="1">
+					<cvParam cvRef="MS" accession="MS:1000795" name="no combination" value="" />
+					<scan instrumentConfigurationRef="IC1">
+						<referenceableParamGroupRef ref="scan1" />
+						<cvParam cvRef="IMS" accession="IMS:1000050" name="position x" value="2" />
+						<cvParam cvRef="IMS" accession="IMS:1000051" name="position y" value="3" />
+					</scan>
+				</scanList>
+				<binaryDataArrayList count="2">
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="mzArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="16" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="13" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="52" />
+						<binary />
+					</binaryDataArray>
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="intensityArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="276" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="13" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="52" />
+						<binary />
+					</binaryDataArray>
+				</binaryDataArrayList>
+			</spectrum>
+			<spectrum id="Spectrum=6" defaultArrayLength="0" index="6">
+				<referenceableParamGroupRef ref="spectrum1" />
+				<scanList count="1">
+					<cvParam cvRef="MS" accession="MS:1000795" name="no combination" value="" />
+					<scan instrumentConfigurationRef="IC1">
+						<referenceableParamGroupRef ref="scan1" />
+						<cvParam cvRef="IMS" accession="IMS:1000050" name="position x" value="3" />
+						<cvParam cvRef="IMS" accession="IMS:1000051" name="position y" value="3" />
+					</scan>
+				</scanList>
+				<binaryDataArrayList count="2">
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="mzArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="16" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="13" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="52" />
+						<binary />
+					</binaryDataArray>
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="intensityArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="328" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="13" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="52" />
+						<binary />
+					</binaryDataArray>
+				</binaryDataArrayList>
+			</spectrum>
+		</spectrumList>
+	</run>
+</mzML>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/out5.imzml.txt	Fri Feb 15 10:21:09 2019 -0500
@@ -0,0 +1,4 @@
+imzML file:
+total 20
+-rw-r--r-- 1 meli meli   380 Feb 12 00:50 ibd
+-rw-r--r-- 1 meli meli 12508 Feb 12 00:50 imzml
Binary file test-data/out6.ibd has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/out6.imzml	Fri Feb 15 10:21:09 2019 -0500
@@ -0,0 +1,313 @@
+<?xml version="1.0"?>
+<mzML version="1.1" xmlns="http://psi.hupo.org/ms/mzml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://psi.hupo.org/ms/mzml http://psidev.info/files/ms/mzML/xsd/mzML1.1.0_idx.xsd">
+	<cvList count="3">
+		<cv id="MS" fullName="Proteomics Standards Initiative Mass Spectrometry Ontology" version="1.3.1" URI="http://psidev.info/ms/mzML/psi-ms.obo" />
+		<cv id="UO" fullName="Unit Ontology" version="1.15" URI="http://obo.cvs.sourceforge.net/obo/obo/ontology/phenotype/unit.obo" />
+		<cv id="IMS" fullName="Imaging MS Ontology" version="0.9.1" URI="http://www.maldi-msi.org/download/imzml/imagingMS.obo" />
+	</cvList>
+	<fileDescription>
+		<fileContent>
+			<cvParam cvRef="MS" accession="MS:1000579" name="MS1 spectrum" value="" />
+			<cvParam cvRef="MS" accession="MS:1000128" name="profile spectrum" value="" />
+			<cvParam cvRef="IMS" accession="IMS:1000080" name="universally unique identifier" value="{24BF18EC-E1DE-4B67-BC12-C3EB475CFC0A}" />
+			<cvParam cvRef="IMS" accession="IMS:1000091" name="ibd SHA-1" value="DA0417F6AA4EDD71F808B6EA0D7A0706737464EB" />
+			<cvParam cvRef="IMS" accession="IMS:1000030" name="continuous" value="" />
+		</fileContent>
+	</fileDescription>
+	<referenceableParamGroupList count="4">
+		<referenceableParamGroup id="spectrum1">
+			<cvParam cvRef="MS" accession="MS:1000579" name="MS1 spectrum" value="" />
+			<cvParam cvRef="MS" accession="MS:1000511" name="ms level" value="0" />
+			<cvParam cvRef="MS" accession="MS:1000128" name="profile spectrum" value="" />
+		</referenceableParamGroup>
+		<referenceableParamGroup id="scan1">
+			<cvParam cvRef="MS" accession="MS:1000093" name="increasing m/z scan" value="" />
+			<cvParam cvRef="MS" accession="MS:1000095" name="linear" value="" />
+		</referenceableParamGroup>
+		<referenceableParamGroup id="mzArray">
+			<cvParam cvRef="MS" accession="MS:1000576" name="no compression" value="" />
+			<cvParam cvRef="MS" accession="MS:1000514" name="m/z array" value="" unitCvRef="MS" unitAccession="MS:1000040" unitName="m/z" />
+			<cvParam cvRef="IMS" accession="IMS:1000101" name="external data" value="true" />
+			<cvParam cvRef="MS" accession="MS:1000521" name="32-bit float" value="32-bit float" />
+		</referenceableParamGroup>
+		<referenceableParamGroup id="intensityArray">
+			<cvParam cvRef="MS" accession="MS:1000576" name="no compression" value="" />
+			<cvParam cvRef="MS" accession="MS:1000515" name="intensity array" value="" unitCvRef="MS" unitAccession="MS:1000131" unitName="number of counts" />
+			<cvParam cvRef="IMS" accession="IMS:1000101" name="external data" value="true" />
+			<cvParam cvRef="MS" accession="MS:1000521" name="32-bit float" value="32-bit float" />
+		</referenceableParamGroup>
+	</referenceableParamGroupList>
+	<sampleList count="1">
+		<sample id="sample1" name="Sample1">
+			<cvParam cvRef="MS" accession="MS:1000001" name="sample number" value="1" />
+		</sample>
+	</sampleList>
+	<softwareList count="1">
+		<software id="Cardinal" version="1.12.1">
+			<cvParam cvRef="MS" accession="MS:1000799" name="custom unreleased software tool" value="" />
+		</software>
+	</softwareList>
+	<scanSettingsList count="1">
+		<scanSettings id="scansettings1">
+			<cvParam cvRef="IMS" accession="IMS:1000042" name="max count of pixel x" value="3" />
+			<cvParam cvRef="IMS" accession="IMS:1000043" name="max count of pixel y" value="3" />
+		</scanSettings>
+	</scanSettingsList>
+	<instrumentConfigurationList count="1">
+		<instrumentConfiguration id="IC1" />
+	</instrumentConfigurationList>
+	<dataProcessingList count="1">
+		<dataProcessing id="CardinalWriteImzML">
+			<processingMethod order="1" softwareRef="Cardinal">
+				<cvParam cvRef="MS" accession="MS:1000544" name="Conversion to mzML" value="" />
+			</processingMethod>
+		</dataProcessing>
+	</dataProcessingList>
+	<run defaultInstrumentConfigurationRef="IC1" id="Experiment01" sampleRef="sample1">
+		<spectrumList count="9" defaultDataProcessingRef="CardinalWriteImzML">
+			<spectrum id="Spectrum=1" defaultArrayLength="0" index="1">
+				<referenceableParamGroupRef ref="spectrum1" />
+				<scanList count="1">
+					<cvParam cvRef="MS" accession="MS:1000795" name="no combination" value="" />
+					<scan instrumentConfigurationRef="IC1">
+						<referenceableParamGroupRef ref="scan1" />
+						<cvParam cvRef="IMS" accession="IMS:1000050" name="position x" value="1" />
+						<cvParam cvRef="IMS" accession="IMS:1000051" name="position y" value="1" />
+					</scan>
+				</scanList>
+				<binaryDataArrayList count="2">
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="mzArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="16" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="3672" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="14688" />
+						<binary />
+					</binaryDataArray>
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="intensityArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="14704" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="3672" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="14688" />
+						<binary />
+					</binaryDataArray>
+				</binaryDataArrayList>
+			</spectrum>
+			<spectrum id="Spectrum=2" defaultArrayLength="0" index="2">
+				<referenceableParamGroupRef ref="spectrum1" />
+				<scanList count="1">
+					<cvParam cvRef="MS" accession="MS:1000795" name="no combination" value="" />
+					<scan instrumentConfigurationRef="IC1">
+						<referenceableParamGroupRef ref="scan1" />
+						<cvParam cvRef="IMS" accession="IMS:1000050" name="position x" value="2" />
+						<cvParam cvRef="IMS" accession="IMS:1000051" name="position y" value="1" />
+					</scan>
+				</scanList>
+				<binaryDataArrayList count="2">
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="mzArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="16" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="3672" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="14688" />
+						<binary />
+					</binaryDataArray>
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="intensityArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="29392" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="3672" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="14688" />
+						<binary />
+					</binaryDataArray>
+				</binaryDataArrayList>
+			</spectrum>
+			<spectrum id="Spectrum=3" defaultArrayLength="0" index="3">
+				<referenceableParamGroupRef ref="spectrum1" />
+				<scanList count="1">
+					<cvParam cvRef="MS" accession="MS:1000795" name="no combination" value="" />
+					<scan instrumentConfigurationRef="IC1">
+						<referenceableParamGroupRef ref="scan1" />
+						<cvParam cvRef="IMS" accession="IMS:1000050" name="position x" value="3" />
+						<cvParam cvRef="IMS" accession="IMS:1000051" name="position y" value="1" />
+					</scan>
+				</scanList>
+				<binaryDataArrayList count="2">
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="mzArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="16" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="3672" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="14688" />
+						<binary />
+					</binaryDataArray>
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="intensityArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="44080" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="3672" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="14688" />
+						<binary />
+					</binaryDataArray>
+				</binaryDataArrayList>
+			</spectrum>
+			<spectrum id="Spectrum=4" defaultArrayLength="0" index="4">
+				<referenceableParamGroupRef ref="spectrum1" />
+				<scanList count="1">
+					<cvParam cvRef="MS" accession="MS:1000795" name="no combination" value="" />
+					<scan instrumentConfigurationRef="IC1">
+						<referenceableParamGroupRef ref="scan1" />
+						<cvParam cvRef="IMS" accession="IMS:1000050" name="position x" value="1" />
+						<cvParam cvRef="IMS" accession="IMS:1000051" name="position y" value="2" />
+					</scan>
+				</scanList>
+				<binaryDataArrayList count="2">
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="mzArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="16" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="3672" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="14688" />
+						<binary />
+					</binaryDataArray>
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="intensityArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="58768" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="3672" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="14688" />
+						<binary />
+					</binaryDataArray>
+				</binaryDataArrayList>
+			</spectrum>
+			<spectrum id="Spectrum=5" defaultArrayLength="0" index="5">
+				<referenceableParamGroupRef ref="spectrum1" />
+				<scanList count="1">
+					<cvParam cvRef="MS" accession="MS:1000795" name="no combination" value="" />
+					<scan instrumentConfigurationRef="IC1">
+						<referenceableParamGroupRef ref="scan1" />
+						<cvParam cvRef="IMS" accession="IMS:1000050" name="position x" value="2" />
+						<cvParam cvRef="IMS" accession="IMS:1000051" name="position y" value="2" />
+					</scan>
+				</scanList>
+				<binaryDataArrayList count="2">
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="mzArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="16" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="3672" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="14688" />
+						<binary />
+					</binaryDataArray>
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="intensityArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="73456" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="3672" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="14688" />
+						<binary />
+					</binaryDataArray>
+				</binaryDataArrayList>
+			</spectrum>
+			<spectrum id="Spectrum=6" defaultArrayLength="0" index="6">
+				<referenceableParamGroupRef ref="spectrum1" />
+				<scanList count="1">
+					<cvParam cvRef="MS" accession="MS:1000795" name="no combination" value="" />
+					<scan instrumentConfigurationRef="IC1">
+						<referenceableParamGroupRef ref="scan1" />
+						<cvParam cvRef="IMS" accession="IMS:1000050" name="position x" value="3" />
+						<cvParam cvRef="IMS" accession="IMS:1000051" name="position y" value="2" />
+					</scan>
+				</scanList>
+				<binaryDataArrayList count="2">
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="mzArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="16" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="3672" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="14688" />
+						<binary />
+					</binaryDataArray>
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="intensityArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="88144" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="3672" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="14688" />
+						<binary />
+					</binaryDataArray>
+				</binaryDataArrayList>
+			</spectrum>
+			<spectrum id="Spectrum=7" defaultArrayLength="0" index="7">
+				<referenceableParamGroupRef ref="spectrum1" />
+				<scanList count="1">
+					<cvParam cvRef="MS" accession="MS:1000795" name="no combination" value="" />
+					<scan instrumentConfigurationRef="IC1">
+						<referenceableParamGroupRef ref="scan1" />
+						<cvParam cvRef="IMS" accession="IMS:1000050" name="position x" value="1" />
+						<cvParam cvRef="IMS" accession="IMS:1000051" name="position y" value="3" />
+					</scan>
+				</scanList>
+				<binaryDataArrayList count="2">
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="mzArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="16" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="3672" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="14688" />
+						<binary />
+					</binaryDataArray>
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="intensityArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="102832" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="3672" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="14688" />
+						<binary />
+					</binaryDataArray>
+				</binaryDataArrayList>
+			</spectrum>
+			<spectrum id="Spectrum=8" defaultArrayLength="0" index="8">
+				<referenceableParamGroupRef ref="spectrum1" />
+				<scanList count="1">
+					<cvParam cvRef="MS" accession="MS:1000795" name="no combination" value="" />
+					<scan instrumentConfigurationRef="IC1">
+						<referenceableParamGroupRef ref="scan1" />
+						<cvParam cvRef="IMS" accession="IMS:1000050" name="position x" value="2" />
+						<cvParam cvRef="IMS" accession="IMS:1000051" name="position y" value="3" />
+					</scan>
+				</scanList>
+				<binaryDataArrayList count="2">
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="mzArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="16" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="3672" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="14688" />
+						<binary />
+					</binaryDataArray>
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="intensityArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="117520" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="3672" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="14688" />
+						<binary />
+					</binaryDataArray>
+				</binaryDataArrayList>
+			</spectrum>
+			<spectrum id="Spectrum=9" defaultArrayLength="0" index="9">
+				<referenceableParamGroupRef ref="spectrum1" />
+				<scanList count="1">
+					<cvParam cvRef="MS" accession="MS:1000795" name="no combination" value="" />
+					<scan instrumentConfigurationRef="IC1">
+						<referenceableParamGroupRef ref="scan1" />
+						<cvParam cvRef="IMS" accession="IMS:1000050" name="position x" value="3" />
+						<cvParam cvRef="IMS" accession="IMS:1000051" name="position y" value="3" />
+					</scan>
+				</scanList>
+				<binaryDataArrayList count="2">
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="mzArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="16" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="3672" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="14688" />
+						<binary />
+					</binaryDataArray>
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="intensityArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="132208" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="3672" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="14688" />
+						<binary />
+					</binaryDataArray>
+				</binaryDataArrayList>
+			</spectrum>
+		</spectrumList>
+	</run>
+</mzML>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/out6.imzml.txt	Fri Feb 15 10:21:09 2019 -0500
@@ -0,0 +1,4 @@
+imzML file:
+total 164
+-rw-r--r-- 1 meli meli 146896 Feb 12 00:51 ibd
+-rw-r--r-- 1 meli meli  16868 Feb 12 00:51 imzml
Binary file test-data/out7.ibd has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/out7.imzml	Fri Feb 15 10:21:09 2019 -0500
@@ -0,0 +1,313 @@
+<?xml version="1.0"?>
+<mzML version="1.1" xmlns="http://psi.hupo.org/ms/mzml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://psi.hupo.org/ms/mzml http://psidev.info/files/ms/mzML/xsd/mzML1.1.0_idx.xsd">
+	<cvList count="3">
+		<cv id="MS" fullName="Proteomics Standards Initiative Mass Spectrometry Ontology" version="1.3.1" URI="http://psidev.info/ms/mzML/psi-ms.obo" />
+		<cv id="UO" fullName="Unit Ontology" version="1.15" URI="http://obo.cvs.sourceforge.net/obo/obo/ontology/phenotype/unit.obo" />
+		<cv id="IMS" fullName="Imaging MS Ontology" version="0.9.1" URI="http://www.maldi-msi.org/download/imzml/imagingMS.obo" />
+	</cvList>
+	<fileDescription>
+		<fileContent>
+			<cvParam cvRef="MS" accession="MS:1000579" name="MS1 spectrum" value="" />
+			<cvParam cvRef="MS" accession="MS:1000128" name="profile spectrum" value="" />
+			<cvParam cvRef="IMS" accession="IMS:1000080" name="universally unique identifier" value="{B095BB77-684D-4BFF-82D3-B76D0EB1C0CD}" />
+			<cvParam cvRef="IMS" accession="IMS:1000091" name="ibd SHA-1" value="628A551B81DCF301B65E3A5AB1182F0BF319533C" />
+			<cvParam cvRef="IMS" accession="IMS:1000030" name="continuous" value="" />
+		</fileContent>
+	</fileDescription>
+	<referenceableParamGroupList count="4">
+		<referenceableParamGroup id="spectrum1">
+			<cvParam cvRef="MS" accession="MS:1000579" name="MS1 spectrum" value="" />
+			<cvParam cvRef="MS" accession="MS:1000511" name="ms level" value="0" />
+			<cvParam cvRef="MS" accession="MS:1000128" name="profile spectrum" value="" />
+		</referenceableParamGroup>
+		<referenceableParamGroup id="scan1">
+			<cvParam cvRef="MS" accession="MS:1000093" name="increasing m/z scan" value="" />
+			<cvParam cvRef="MS" accession="MS:1000095" name="linear" value="" />
+		</referenceableParamGroup>
+		<referenceableParamGroup id="mzArray">
+			<cvParam cvRef="MS" accession="MS:1000576" name="no compression" value="" />
+			<cvParam cvRef="MS" accession="MS:1000514" name="m/z array" value="" unitCvRef="MS" unitAccession="MS:1000040" unitName="m/z" />
+			<cvParam cvRef="IMS" accession="IMS:1000101" name="external data" value="true" />
+			<cvParam cvRef="MS" accession="MS:1000521" name="32-bit float" value="32-bit float" />
+		</referenceableParamGroup>
+		<referenceableParamGroup id="intensityArray">
+			<cvParam cvRef="MS" accession="MS:1000576" name="no compression" value="" />
+			<cvParam cvRef="MS" accession="MS:1000515" name="intensity array" value="" unitCvRef="MS" unitAccession="MS:1000131" unitName="number of counts" />
+			<cvParam cvRef="IMS" accession="IMS:1000101" name="external data" value="true" />
+			<cvParam cvRef="MS" accession="MS:1000521" name="32-bit float" value="32-bit float" />
+		</referenceableParamGroup>
+	</referenceableParamGroupList>
+	<sampleList count="1">
+		<sample id="sample1" name="Sample1">
+			<cvParam cvRef="MS" accession="MS:1000001" name="sample number" value="1" />
+		</sample>
+	</sampleList>
+	<softwareList count="1">
+		<software id="Cardinal" version="1.12.1">
+			<cvParam cvRef="MS" accession="MS:1000799" name="custom unreleased software tool" value="" />
+		</software>
+	</softwareList>
+	<scanSettingsList count="1">
+		<scanSettings id="scansettings1">
+			<cvParam cvRef="IMS" accession="IMS:1000042" name="max count of pixel x" value="3" />
+			<cvParam cvRef="IMS" accession="IMS:1000043" name="max count of pixel y" value="3" />
+		</scanSettings>
+	</scanSettingsList>
+	<instrumentConfigurationList count="1">
+		<instrumentConfiguration id="IC1" />
+	</instrumentConfigurationList>
+	<dataProcessingList count="1">
+		<dataProcessing id="CardinalWriteImzML">
+			<processingMethod order="1" softwareRef="Cardinal">
+				<cvParam cvRef="MS" accession="MS:1000544" name="Conversion to mzML" value="" />
+			</processingMethod>
+		</dataProcessing>
+	</dataProcessingList>
+	<run defaultInstrumentConfigurationRef="IC1" id="Experiment01" sampleRef="sample1">
+		<spectrumList count="9" defaultDataProcessingRef="CardinalWriteImzML">
+			<spectrum id="Spectrum=1" defaultArrayLength="0" index="1">
+				<referenceableParamGroupRef ref="spectrum1" />
+				<scanList count="1">
+					<cvParam cvRef="MS" accession="MS:1000795" name="no combination" value="" />
+					<scan instrumentConfigurationRef="IC1">
+						<referenceableParamGroupRef ref="scan1" />
+						<cvParam cvRef="IMS" accession="IMS:1000050" name="position x" value="1" />
+						<cvParam cvRef="IMS" accession="IMS:1000051" name="position y" value="1" />
+					</scan>
+				</scanList>
+				<binaryDataArrayList count="2">
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="mzArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="16" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="2399" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="9596" />
+						<binary />
+					</binaryDataArray>
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="intensityArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="9612" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="2399" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="9596" />
+						<binary />
+					</binaryDataArray>
+				</binaryDataArrayList>
+			</spectrum>
+			<spectrum id="Spectrum=2" defaultArrayLength="0" index="2">
+				<referenceableParamGroupRef ref="spectrum1" />
+				<scanList count="1">
+					<cvParam cvRef="MS" accession="MS:1000795" name="no combination" value="" />
+					<scan instrumentConfigurationRef="IC1">
+						<referenceableParamGroupRef ref="scan1" />
+						<cvParam cvRef="IMS" accession="IMS:1000050" name="position x" value="2" />
+						<cvParam cvRef="IMS" accession="IMS:1000051" name="position y" value="1" />
+					</scan>
+				</scanList>
+				<binaryDataArrayList count="2">
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="mzArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="16" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="2399" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="9596" />
+						<binary />
+					</binaryDataArray>
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="intensityArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="19208" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="2399" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="9596" />
+						<binary />
+					</binaryDataArray>
+				</binaryDataArrayList>
+			</spectrum>
+			<spectrum id="Spectrum=3" defaultArrayLength="0" index="3">
+				<referenceableParamGroupRef ref="spectrum1" />
+				<scanList count="1">
+					<cvParam cvRef="MS" accession="MS:1000795" name="no combination" value="" />
+					<scan instrumentConfigurationRef="IC1">
+						<referenceableParamGroupRef ref="scan1" />
+						<cvParam cvRef="IMS" accession="IMS:1000050" name="position x" value="3" />
+						<cvParam cvRef="IMS" accession="IMS:1000051" name="position y" value="1" />
+					</scan>
+				</scanList>
+				<binaryDataArrayList count="2">
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="mzArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="16" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="2399" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="9596" />
+						<binary />
+					</binaryDataArray>
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="intensityArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="28804" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="2399" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="9596" />
+						<binary />
+					</binaryDataArray>
+				</binaryDataArrayList>
+			</spectrum>
+			<spectrum id="Spectrum=4" defaultArrayLength="0" index="4">
+				<referenceableParamGroupRef ref="spectrum1" />
+				<scanList count="1">
+					<cvParam cvRef="MS" accession="MS:1000795" name="no combination" value="" />
+					<scan instrumentConfigurationRef="IC1">
+						<referenceableParamGroupRef ref="scan1" />
+						<cvParam cvRef="IMS" accession="IMS:1000050" name="position x" value="1" />
+						<cvParam cvRef="IMS" accession="IMS:1000051" name="position y" value="2" />
+					</scan>
+				</scanList>
+				<binaryDataArrayList count="2">
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="mzArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="16" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="2399" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="9596" />
+						<binary />
+					</binaryDataArray>
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="intensityArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="38400" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="2399" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="9596" />
+						<binary />
+					</binaryDataArray>
+				</binaryDataArrayList>
+			</spectrum>
+			<spectrum id="Spectrum=5" defaultArrayLength="0" index="5">
+				<referenceableParamGroupRef ref="spectrum1" />
+				<scanList count="1">
+					<cvParam cvRef="MS" accession="MS:1000795" name="no combination" value="" />
+					<scan instrumentConfigurationRef="IC1">
+						<referenceableParamGroupRef ref="scan1" />
+						<cvParam cvRef="IMS" accession="IMS:1000050" name="position x" value="2" />
+						<cvParam cvRef="IMS" accession="IMS:1000051" name="position y" value="2" />
+					</scan>
+				</scanList>
+				<binaryDataArrayList count="2">
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="mzArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="16" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="2399" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="9596" />
+						<binary />
+					</binaryDataArray>
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="intensityArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="47996" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="2399" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="9596" />
+						<binary />
+					</binaryDataArray>
+				</binaryDataArrayList>
+			</spectrum>
+			<spectrum id="Spectrum=6" defaultArrayLength="0" index="6">
+				<referenceableParamGroupRef ref="spectrum1" />
+				<scanList count="1">
+					<cvParam cvRef="MS" accession="MS:1000795" name="no combination" value="" />
+					<scan instrumentConfigurationRef="IC1">
+						<referenceableParamGroupRef ref="scan1" />
+						<cvParam cvRef="IMS" accession="IMS:1000050" name="position x" value="3" />
+						<cvParam cvRef="IMS" accession="IMS:1000051" name="position y" value="2" />
+					</scan>
+				</scanList>
+				<binaryDataArrayList count="2">
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="mzArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="16" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="2399" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="9596" />
+						<binary />
+					</binaryDataArray>
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="intensityArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="57592" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="2399" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="9596" />
+						<binary />
+					</binaryDataArray>
+				</binaryDataArrayList>
+			</spectrum>
+			<spectrum id="Spectrum=7" defaultArrayLength="0" index="7">
+				<referenceableParamGroupRef ref="spectrum1" />
+				<scanList count="1">
+					<cvParam cvRef="MS" accession="MS:1000795" name="no combination" value="" />
+					<scan instrumentConfigurationRef="IC1">
+						<referenceableParamGroupRef ref="scan1" />
+						<cvParam cvRef="IMS" accession="IMS:1000050" name="position x" value="1" />
+						<cvParam cvRef="IMS" accession="IMS:1000051" name="position y" value="3" />
+					</scan>
+				</scanList>
+				<binaryDataArrayList count="2">
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="mzArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="16" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="2399" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="9596" />
+						<binary />
+					</binaryDataArray>
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="intensityArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="67188" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="2399" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="9596" />
+						<binary />
+					</binaryDataArray>
+				</binaryDataArrayList>
+			</spectrum>
+			<spectrum id="Spectrum=8" defaultArrayLength="0" index="8">
+				<referenceableParamGroupRef ref="spectrum1" />
+				<scanList count="1">
+					<cvParam cvRef="MS" accession="MS:1000795" name="no combination" value="" />
+					<scan instrumentConfigurationRef="IC1">
+						<referenceableParamGroupRef ref="scan1" />
+						<cvParam cvRef="IMS" accession="IMS:1000050" name="position x" value="2" />
+						<cvParam cvRef="IMS" accession="IMS:1000051" name="position y" value="3" />
+					</scan>
+				</scanList>
+				<binaryDataArrayList count="2">
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="mzArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="16" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="2399" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="9596" />
+						<binary />
+					</binaryDataArray>
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="intensityArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="76784" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="2399" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="9596" />
+						<binary />
+					</binaryDataArray>
+				</binaryDataArrayList>
+			</spectrum>
+			<spectrum id="Spectrum=9" defaultArrayLength="0" index="9">
+				<referenceableParamGroupRef ref="spectrum1" />
+				<scanList count="1">
+					<cvParam cvRef="MS" accession="MS:1000795" name="no combination" value="" />
+					<scan instrumentConfigurationRef="IC1">
+						<referenceableParamGroupRef ref="scan1" />
+						<cvParam cvRef="IMS" accession="IMS:1000050" name="position x" value="3" />
+						<cvParam cvRef="IMS" accession="IMS:1000051" name="position y" value="3" />
+					</scan>
+				</scanList>
+				<binaryDataArrayList count="2">
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="mzArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="16" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="2399" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="9596" />
+						<binary />
+					</binaryDataArray>
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="intensityArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="86380" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="2399" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="9596" />
+						<binary />
+					</binaryDataArray>
+				</binaryDataArrayList>
+			</spectrum>
+		</spectrumList>
+	</run>
+</mzML>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/out7.imzml.txt	Fri Feb 15 10:21:09 2019 -0500
@@ -0,0 +1,4 @@
+imzML file:
+total 116
+-rw-r--r-- 1 meli meli 95976 Feb 12 00:51 ibd
+-rw-r--r-- 1 meli meli 16846 Feb 12 00:51 imzml
Binary file test-data/pca_imzml.pdf has changed
--- a/test-data/pixel_out2.tabular	Thu Oct 25 07:28:42 2018 -0400
+++ b/test-data/pixel_out2.tabular	Fri Feb 15 10:21:09 2019 -0500
@@ -1,10 +1,10 @@
-spectra_names	x_values	y_values	pixel_order	peaks_per_spectrum	spectrum_TIC	most_abundant_mz	annotation
-xy_1_1	1	1	1	3672	42479	1267.525390625	col1
-xy_2_1	2	1	2	3672	29179	1264.42407226562	col2
-xy_3_1	3	1	3	3672	37005	1267.525390625	col3
-xy_1_2	1	2	4	3672	42306	1264.38171386719	col1
-xy_2_2	2	2	5	3672	30350	1267.525390625	col2
-xy_3_2	3	2	6	3672	35955	1199.55615234375	col3
-xy_1_3	1	3	7	3672	43872	1199.59753417969	col1
-xy_2_3	2	3	8	3672	33204	1267.48278808594	col2
-xy_3_3	3	3	9	3672	37961	1199.55615234375	col3
+spectra_names	x_values	y_values	pixel_order	peaks_per_spectrum	median_intensity	spectrum_TIC	maximum_intensity	most_abundant_mz	annotation
+xy_1_1	1	1	1	3672	11	42479	43	1267.525390625	col1
+xy_2_1	2	1	2	3672	8	29179	20	1264.42407226562	col2
+xy_3_1	3	1	3	3672	9	37005	42	1267.525390625	col3
+xy_1_2	1	2	4	3672	11	42306	49	1264.38171386719	col1
+xy_2_2	2	2	5	3672	8	30350	21	1267.525390625	col2
+xy_3_2	3	2	6	3672	9	35955	39	1199.55615234375	col3
+xy_1_3	1	3	7	3672	11	43872	84	1199.59753417969	col1
+xy_2_3	2	3	8	3672	9	33204	26	1267.48278808594	col2
+xy_3_3	3	3	9	3672	10	37961	47	1199.55615234375	col3
--- a/test-data/pixel_out3.tabular	Thu Oct 25 07:28:42 2018 -0400
+++ b/test-data/pixel_out3.tabular	Fri Feb 15 10:21:09 2019 -0500
@@ -1,10 +1,10 @@
-spectra_names	x_values	y_values	pixel_order	peaks_per_spectrum	spectrum_TIC	most_abundant_mz	input m/z count
-xy_1_1	1	1	1	241	22.92	329.083343505859	0
-xy_2_1	2	1	2	332	29.26	328.916687011719	0
-xy_3_1	3	1	3	415	24.43	328.916687011719	0
-xy_1_2	1	2	4	343	39.62	329	0
-xy_2_2	2	2	5	301	18.34	328.916687011719	0
-xy_3_2	3	2	6	194	10.79	345.083343505859	0
-xy_1_3	1	3	7	308	14.68	328.916687011719	0
-xy_2_3	2	3	8	367	24.87	329	0
-xy_3_3	3	3	9	323	35.18	329.083343505859	0
+spectra_names	x_values	y_values	pixel_order	peaks_per_spectrum	median_intensity	spectrum_TIC	maximum_intensity	most_abundant_mz	m/z count
+xy_1_1	1	1	1	241	0	22.92	2.48	329.083343505859	0
+xy_2_1	2	1	2	332	0	29.26	2.02	328.916687011719	0
+xy_3_1	3	1	3	415	0	24.43	1.43	328.916687011719	0
+xy_1_2	1	2	4	343	0	39.62	2.59	329	0
+xy_2_2	2	2	5	301	0	18.34	2.38	328.916687011719	0
+xy_3_2	3	2	6	194	0	10.79	1.06	345.083343505859	0
+xy_1_3	1	3	7	308	0	14.68	0.74	328.916687011719	0
+xy_2_3	2	3	8	367	0	24.87	1.33	329	0
+xy_3_3	3	3	9	323	0	35.18	1.73	329.083343505859	0
Binary file test-data/preprocessed.rdata has changed
Binary file test-data/preprocessing_results1.RData has changed
Binary file test-data/preprocessing_results1.ibd has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/preprocessing_results1.imzml	Fri Feb 15 10:21:09 2019 -0500
@@ -0,0 +1,313 @@
+<?xml version="1.0"?>
+<mzML version="1.1" xmlns="http://psi.hupo.org/ms/mzml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://psi.hupo.org/ms/mzml http://psidev.info/files/ms/mzML/xsd/mzML1.1.0_idx.xsd">
+	<cvList count="3">
+		<cv id="MS" fullName="Proteomics Standards Initiative Mass Spectrometry Ontology" version="1.3.1" URI="http://psidev.info/ms/mzML/psi-ms.obo" />
+		<cv id="UO" fullName="Unit Ontology" version="1.15" URI="http://obo.cvs.sourceforge.net/obo/obo/ontology/phenotype/unit.obo" />
+		<cv id="IMS" fullName="Imaging MS Ontology" version="0.9.1" URI="http://www.maldi-msi.org/download/imzml/imagingMS.obo" />
+	</cvList>
+	<fileDescription>
+		<fileContent>
+			<cvParam cvRef="MS" accession="MS:1000579" name="MS1 spectrum" value="" />
+			<cvParam cvRef="MS" accession="MS:1000127" name="centroid spectrum" value="" />
+			<cvParam cvRef="IMS" accession="IMS:1000080" name="universally unique identifier" value="{002DF5BA-0549-44DF-A8BB-27DA3E197EB7}" />
+			<cvParam cvRef="IMS" accession="IMS:1000091" name="ibd SHA-1" value="0379019A6F9D0B55F9217420030633F7163AF9D3" />
+			<cvParam cvRef="IMS" accession="IMS:1000030" name="continuous" value="" />
+		</fileContent>
+	</fileDescription>
+	<referenceableParamGroupList count="4">
+		<referenceableParamGroup id="spectrum1">
+			<cvParam cvRef="MS" accession="MS:1000579" name="MS1 spectrum" value="" />
+			<cvParam cvRef="MS" accession="MS:1000511" name="ms level" value="0" />
+			<cvParam cvRef="MS" accession="MS:1000127" name="centroid spectrum" value="" />
+		</referenceableParamGroup>
+		<referenceableParamGroup id="scan1">
+			<cvParam cvRef="MS" accession="MS:1000093" name="increasing m/z scan" value="" />
+			<cvParam cvRef="MS" accession="MS:1000095" name="linear" value="" />
+		</referenceableParamGroup>
+		<referenceableParamGroup id="mzArray">
+			<cvParam cvRef="MS" accession="MS:1000576" name="no compression" value="" />
+			<cvParam cvRef="MS" accession="MS:1000514" name="m/z array" value="" unitCvRef="MS" unitAccession="MS:1000040" unitName="m/z" />
+			<cvParam cvRef="IMS" accession="IMS:1000101" name="external data" value="true" />
+			<cvParam cvRef="MS" accession="MS:1000521" name="32-bit float" value="32-bit float" />
+		</referenceableParamGroup>
+		<referenceableParamGroup id="intensityArray">
+			<cvParam cvRef="MS" accession="MS:1000576" name="no compression" value="" />
+			<cvParam cvRef="MS" accession="MS:1000515" name="intensity array" value="" unitCvRef="MS" unitAccession="MS:1000131" unitName="number of counts" />
+			<cvParam cvRef="IMS" accession="IMS:1000101" name="external data" value="true" />
+			<cvParam cvRef="MS" accession="MS:1000521" name="32-bit float" value="32-bit float" />
+		</referenceableParamGroup>
+	</referenceableParamGroupList>
+	<sampleList count="1">
+		<sample id="sample1" name="Sample1">
+			<cvParam cvRef="MS" accession="MS:1000001" name="sample number" value="1" />
+		</sample>
+	</sampleList>
+	<softwareList count="1">
+		<software id="Cardinal" version="1.12.1">
+			<cvParam cvRef="MS" accession="MS:1000799" name="custom unreleased software tool" value="" />
+		</software>
+	</softwareList>
+	<scanSettingsList count="1">
+		<scanSettings id="scansettings1">
+			<cvParam cvRef="IMS" accession="IMS:1000042" name="max count of pixel x" value="3" />
+			<cvParam cvRef="IMS" accession="IMS:1000043" name="max count of pixel y" value="3" />
+		</scanSettings>
+	</scanSettingsList>
+	<instrumentConfigurationList count="1">
+		<instrumentConfiguration id="IC1" />
+	</instrumentConfigurationList>
+	<dataProcessingList count="1">
+		<dataProcessing id="CardinalWriteImzML">
+			<processingMethod order="1" softwareRef="Cardinal">
+				<cvParam cvRef="MS" accession="MS:1000544" name="Conversion to mzML" value="" />
+			</processingMethod>
+		</dataProcessing>
+	</dataProcessingList>
+	<run defaultInstrumentConfigurationRef="IC1" id="Experiment01" sampleRef="sample1">
+		<spectrumList count="9" defaultDataProcessingRef="CardinalWriteImzML">
+			<spectrum id="Spectrum=1" defaultArrayLength="0" index="1">
+				<referenceableParamGroupRef ref="spectrum1" />
+				<scanList count="1">
+					<cvParam cvRef="MS" accession="MS:1000795" name="no combination" value="" />
+					<scan instrumentConfigurationRef="IC1">
+						<referenceableParamGroupRef ref="scan1" />
+						<cvParam cvRef="IMS" accession="IMS:1000050" name="position x" value="1" />
+						<cvParam cvRef="IMS" accession="IMS:1000051" name="position y" value="1" />
+					</scan>
+				</scanList>
+				<binaryDataArrayList count="2">
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="mzArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="16" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="2" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="8" />
+						<binary />
+					</binaryDataArray>
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="intensityArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="24" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="2" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="8" />
+						<binary />
+					</binaryDataArray>
+				</binaryDataArrayList>
+			</spectrum>
+			<spectrum id="Spectrum=2" defaultArrayLength="0" index="2">
+				<referenceableParamGroupRef ref="spectrum1" />
+				<scanList count="1">
+					<cvParam cvRef="MS" accession="MS:1000795" name="no combination" value="" />
+					<scan instrumentConfigurationRef="IC1">
+						<referenceableParamGroupRef ref="scan1" />
+						<cvParam cvRef="IMS" accession="IMS:1000050" name="position x" value="2" />
+						<cvParam cvRef="IMS" accession="IMS:1000051" name="position y" value="1" />
+					</scan>
+				</scanList>
+				<binaryDataArrayList count="2">
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="mzArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="16" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="2" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="8" />
+						<binary />
+					</binaryDataArray>
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="intensityArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="32" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="2" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="8" />
+						<binary />
+					</binaryDataArray>
+				</binaryDataArrayList>
+			</spectrum>
+			<spectrum id="Spectrum=3" defaultArrayLength="0" index="3">
+				<referenceableParamGroupRef ref="spectrum1" />
+				<scanList count="1">
+					<cvParam cvRef="MS" accession="MS:1000795" name="no combination" value="" />
+					<scan instrumentConfigurationRef="IC1">
+						<referenceableParamGroupRef ref="scan1" />
+						<cvParam cvRef="IMS" accession="IMS:1000050" name="position x" value="3" />
+						<cvParam cvRef="IMS" accession="IMS:1000051" name="position y" value="1" />
+					</scan>
+				</scanList>
+				<binaryDataArrayList count="2">
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="mzArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="16" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="2" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="8" />
+						<binary />
+					</binaryDataArray>
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="intensityArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="40" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="2" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="8" />
+						<binary />
+					</binaryDataArray>
+				</binaryDataArrayList>
+			</spectrum>
+			<spectrum id="Spectrum=4" defaultArrayLength="0" index="4">
+				<referenceableParamGroupRef ref="spectrum1" />
+				<scanList count="1">
+					<cvParam cvRef="MS" accession="MS:1000795" name="no combination" value="" />
+					<scan instrumentConfigurationRef="IC1">
+						<referenceableParamGroupRef ref="scan1" />
+						<cvParam cvRef="IMS" accession="IMS:1000050" name="position x" value="1" />
+						<cvParam cvRef="IMS" accession="IMS:1000051" name="position y" value="2" />
+					</scan>
+				</scanList>
+				<binaryDataArrayList count="2">
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="mzArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="16" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="2" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="8" />
+						<binary />
+					</binaryDataArray>
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="intensityArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="48" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="2" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="8" />
+						<binary />
+					</binaryDataArray>
+				</binaryDataArrayList>
+			</spectrum>
+			<spectrum id="Spectrum=5" defaultArrayLength="0" index="5">
+				<referenceableParamGroupRef ref="spectrum1" />
+				<scanList count="1">
+					<cvParam cvRef="MS" accession="MS:1000795" name="no combination" value="" />
+					<scan instrumentConfigurationRef="IC1">
+						<referenceableParamGroupRef ref="scan1" />
+						<cvParam cvRef="IMS" accession="IMS:1000050" name="position x" value="2" />
+						<cvParam cvRef="IMS" accession="IMS:1000051" name="position y" value="2" />
+					</scan>
+				</scanList>
+				<binaryDataArrayList count="2">
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="mzArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="16" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="2" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="8" />
+						<binary />
+					</binaryDataArray>
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="intensityArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="56" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="2" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="8" />
+						<binary />
+					</binaryDataArray>
+				</binaryDataArrayList>
+			</spectrum>
+			<spectrum id="Spectrum=6" defaultArrayLength="0" index="6">
+				<referenceableParamGroupRef ref="spectrum1" />
+				<scanList count="1">
+					<cvParam cvRef="MS" accession="MS:1000795" name="no combination" value="" />
+					<scan instrumentConfigurationRef="IC1">
+						<referenceableParamGroupRef ref="scan1" />
+						<cvParam cvRef="IMS" accession="IMS:1000050" name="position x" value="3" />
+						<cvParam cvRef="IMS" accession="IMS:1000051" name="position y" value="2" />
+					</scan>
+				</scanList>
+				<binaryDataArrayList count="2">
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="mzArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="16" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="2" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="8" />
+						<binary />
+					</binaryDataArray>
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="intensityArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="64" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="2" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="8" />
+						<binary />
+					</binaryDataArray>
+				</binaryDataArrayList>
+			</spectrum>
+			<spectrum id="Spectrum=7" defaultArrayLength="0" index="7">
+				<referenceableParamGroupRef ref="spectrum1" />
+				<scanList count="1">
+					<cvParam cvRef="MS" accession="MS:1000795" name="no combination" value="" />
+					<scan instrumentConfigurationRef="IC1">
+						<referenceableParamGroupRef ref="scan1" />
+						<cvParam cvRef="IMS" accession="IMS:1000050" name="position x" value="1" />
+						<cvParam cvRef="IMS" accession="IMS:1000051" name="position y" value="3" />
+					</scan>
+				</scanList>
+				<binaryDataArrayList count="2">
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="mzArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="16" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="2" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="8" />
+						<binary />
+					</binaryDataArray>
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="intensityArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="72" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="2" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="8" />
+						<binary />
+					</binaryDataArray>
+				</binaryDataArrayList>
+			</spectrum>
+			<spectrum id="Spectrum=8" defaultArrayLength="0" index="8">
+				<referenceableParamGroupRef ref="spectrum1" />
+				<scanList count="1">
+					<cvParam cvRef="MS" accession="MS:1000795" name="no combination" value="" />
+					<scan instrumentConfigurationRef="IC1">
+						<referenceableParamGroupRef ref="scan1" />
+						<cvParam cvRef="IMS" accession="IMS:1000050" name="position x" value="2" />
+						<cvParam cvRef="IMS" accession="IMS:1000051" name="position y" value="3" />
+					</scan>
+				</scanList>
+				<binaryDataArrayList count="2">
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="mzArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="16" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="2" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="8" />
+						<binary />
+					</binaryDataArray>
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="intensityArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="80" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="2" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="8" />
+						<binary />
+					</binaryDataArray>
+				</binaryDataArrayList>
+			</spectrum>
+			<spectrum id="Spectrum=9" defaultArrayLength="0" index="9">
+				<referenceableParamGroupRef ref="spectrum1" />
+				<scanList count="1">
+					<cvParam cvRef="MS" accession="MS:1000795" name="no combination" value="" />
+					<scan instrumentConfigurationRef="IC1">
+						<referenceableParamGroupRef ref="scan1" />
+						<cvParam cvRef="IMS" accession="IMS:1000050" name="position x" value="3" />
+						<cvParam cvRef="IMS" accession="IMS:1000051" name="position y" value="3" />
+					</scan>
+				</scanList>
+				<binaryDataArrayList count="2">
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="mzArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="16" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="2" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="8" />
+						<binary />
+					</binaryDataArray>
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="intensityArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="88" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="2" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="8" />
+						<binary />
+					</binaryDataArray>
+				</binaryDataArrayList>
+			</spectrum>
+		</spectrumList>
+	</run>
+</mzML>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/preprocessing_results1.imzml.txt	Fri Feb 15 10:21:09 2019 -0500
@@ -0,0 +1,4 @@
+imzML file:
+total 24
+-rw-r--r-- 1 meli meli    96 Feb 12 21:24 ibd
+-rw-r--r-- 1 meli meli 16714 Feb 12 21:24 imzml
Binary file test-data/preprocessing_results1.pdf has changed
--- a/test-data/preprocessing_results1.txt	Thu Oct 25 07:28:42 2018 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-mz	x = 1, y = 1	x = 2, y = 1	x = 3, y = 1	x = 1, y = 2	x = 2, y = 2	x = 3, y = 2	x = 1, y = 3	x = 2, y = 3	x = 3, y = 3
-329	8.48069807321137	6.00276368862812	0	0	7.22240715797167	6.68463797360356	0	0	0
-345	0	0	4.70593890744759	0	0	0	5.23000350586712	4.17949067812964	5.08555910047608
Binary file test-data/preprocessing_results2.RData has changed
Binary file test-data/preprocessing_results2.ibd has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/preprocessing_results2.imzml	Fri Feb 15 10:21:09 2019 -0500
@@ -0,0 +1,394 @@
+<?xml version="1.0"?>
+<mzML version="1.1" xmlns="http://psi.hupo.org/ms/mzml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://psi.hupo.org/ms/mzml http://psidev.info/files/ms/mzML/xsd/mzML1.1.0_idx.xsd">
+	<cvList count="3">
+		<cv id="MS" fullName="Proteomics Standards Initiative Mass Spectrometry Ontology" version="1.3.1" URI="http://psidev.info/ms/mzML/psi-ms.obo" />
+		<cv id="UO" fullName="Unit Ontology" version="1.15" URI="http://obo.cvs.sourceforge.net/obo/obo/ontology/phenotype/unit.obo" />
+		<cv id="IMS" fullName="Imaging MS Ontology" version="0.9.1" URI="http://www.maldi-msi.org/download/imzml/imagingMS.obo" />
+	</cvList>
+	<fileDescription>
+		<fileContent>
+			<cvParam cvRef="MS" accession="MS:1000579" name="MS1 spectrum" value="" />
+			<cvParam cvRef="MS" accession="MS:1000127" name="centroid spectrum" value="" />
+			<cvParam cvRef="IMS" accession="IMS:1000080" name="universally unique identifier" value="{84BEACDD-B841-4730-81A0-A19A28C7B48A}" />
+			<cvParam cvRef="IMS" accession="IMS:1000091" name="ibd SHA-1" value="1BC49DCCC566E7A6938CE3DE62090650C2A04798" />
+			<cvParam cvRef="IMS" accession="IMS:1000030" name="continuous" value="" />
+		</fileContent>
+	</fileDescription>
+	<referenceableParamGroupList count="4">
+		<referenceableParamGroup id="spectrum1">
+			<cvParam cvRef="MS" accession="MS:1000579" name="MS1 spectrum" value="" />
+			<cvParam cvRef="MS" accession="MS:1000511" name="ms level" value="0" />
+			<cvParam cvRef="MS" accession="MS:1000127" name="centroid spectrum" value="" />
+		</referenceableParamGroup>
+		<referenceableParamGroup id="scan1">
+			<cvParam cvRef="MS" accession="MS:1000093" name="increasing m/z scan" value="" />
+			<cvParam cvRef="MS" accession="MS:1000095" name="linear" value="" />
+		</referenceableParamGroup>
+		<referenceableParamGroup id="mzArray">
+			<cvParam cvRef="MS" accession="MS:1000576" name="no compression" value="" />
+			<cvParam cvRef="MS" accession="MS:1000514" name="m/z array" value="" unitCvRef="MS" unitAccession="MS:1000040" unitName="m/z" />
+			<cvParam cvRef="IMS" accession="IMS:1000101" name="external data" value="true" />
+			<cvParam cvRef="MS" accession="MS:1000521" name="32-bit float" value="32-bit float" />
+		</referenceableParamGroup>
+		<referenceableParamGroup id="intensityArray">
+			<cvParam cvRef="MS" accession="MS:1000576" name="no compression" value="" />
+			<cvParam cvRef="MS" accession="MS:1000515" name="intensity array" value="" unitCvRef="MS" unitAccession="MS:1000131" unitName="number of counts" />
+			<cvParam cvRef="IMS" accession="IMS:1000101" name="external data" value="true" />
+			<cvParam cvRef="MS" accession="MS:1000521" name="32-bit float" value="32-bit float" />
+		</referenceableParamGroup>
+	</referenceableParamGroupList>
+	<sampleList count="1">
+		<sample id="sample1" name="Sample1">
+			<cvParam cvRef="MS" accession="MS:1000001" name="sample number" value="1" />
+		</sample>
+	</sampleList>
+	<softwareList count="1">
+		<software id="Cardinal" version="1.12.1">
+			<cvParam cvRef="MS" accession="MS:1000799" name="custom unreleased software tool" value="" />
+		</software>
+	</softwareList>
+	<scanSettingsList count="1">
+		<scanSettings id="scansettings1">
+			<cvParam cvRef="IMS" accession="IMS:1000042" name="max count of pixel x" value="9" />
+			<cvParam cvRef="IMS" accession="IMS:1000043" name="max count of pixel y" value="3" />
+		</scanSettings>
+	</scanSettingsList>
+	<instrumentConfigurationList count="1">
+		<instrumentConfiguration id="IC1" />
+	</instrumentConfigurationList>
+	<dataProcessingList count="1">
+		<dataProcessing id="CardinalWriteImzML">
+			<processingMethod order="1" softwareRef="Cardinal">
+				<cvParam cvRef="MS" accession="MS:1000544" name="Conversion to mzML" value="" />
+			</processingMethod>
+		</dataProcessing>
+	</dataProcessingList>
+	<run defaultInstrumentConfigurationRef="IC1" id="Experiment01" sampleRef="sample1">
+		<spectrumList count="12" defaultDataProcessingRef="CardinalWriteImzML">
+			<spectrum id="Spectrum=1" defaultArrayLength="0" index="1">
+				<referenceableParamGroupRef ref="spectrum1" />
+				<scanList count="1">
+					<cvParam cvRef="MS" accession="MS:1000795" name="no combination" value="" />
+					<scan instrumentConfigurationRef="IC1">
+						<referenceableParamGroupRef ref="scan1" />
+						<cvParam cvRef="IMS" accession="IMS:1000050" name="position x" value="1" />
+						<cvParam cvRef="IMS" accession="IMS:1000051" name="position y" value="1" />
+					</scan>
+				</scanList>
+				<binaryDataArrayList count="2">
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="mzArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="16" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="1052" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="4208" />
+						<binary />
+					</binaryDataArray>
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="intensityArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="4224" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="1052" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="4208" />
+						<binary />
+					</binaryDataArray>
+				</binaryDataArrayList>
+			</spectrum>
+			<spectrum id="Spectrum=2" defaultArrayLength="0" index="2">
+				<referenceableParamGroupRef ref="spectrum1" />
+				<scanList count="1">
+					<cvParam cvRef="MS" accession="MS:1000795" name="no combination" value="" />
+					<scan instrumentConfigurationRef="IC1">
+						<referenceableParamGroupRef ref="scan1" />
+						<cvParam cvRef="IMS" accession="IMS:1000050" name="position x" value="1" />
+						<cvParam cvRef="IMS" accession="IMS:1000051" name="position y" value="2" />
+					</scan>
+				</scanList>
+				<binaryDataArrayList count="2">
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="mzArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="16" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="1052" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="4208" />
+						<binary />
+					</binaryDataArray>
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="intensityArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="8432" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="1052" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="4208" />
+						<binary />
+					</binaryDataArray>
+				</binaryDataArrayList>
+			</spectrum>
+			<spectrum id="Spectrum=3" defaultArrayLength="0" index="3">
+				<referenceableParamGroupRef ref="spectrum1" />
+				<scanList count="1">
+					<cvParam cvRef="MS" accession="MS:1000795" name="no combination" value="" />
+					<scan instrumentConfigurationRef="IC1">
+						<referenceableParamGroupRef ref="scan1" />
+						<cvParam cvRef="IMS" accession="IMS:1000050" name="position x" value="1" />
+						<cvParam cvRef="IMS" accession="IMS:1000051" name="position y" value="3" />
+					</scan>
+				</scanList>
+				<binaryDataArrayList count="2">
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="mzArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="16" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="1052" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="4208" />
+						<binary />
+					</binaryDataArray>
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="intensityArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="12640" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="1052" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="4208" />
+						<binary />
+					</binaryDataArray>
+				</binaryDataArrayList>
+			</spectrum>
+			<spectrum id="Spectrum=4" defaultArrayLength="0" index="4">
+				<referenceableParamGroupRef ref="spectrum1" />
+				<scanList count="1">
+					<cvParam cvRef="MS" accession="MS:1000795" name="no combination" value="" />
+					<scan instrumentConfigurationRef="IC1">
+						<referenceableParamGroupRef ref="scan1" />
+						<cvParam cvRef="IMS" accession="IMS:1000050" name="position x" value="3" />
+						<cvParam cvRef="IMS" accession="IMS:1000051" name="position y" value="1" />
+					</scan>
+				</scanList>
+				<binaryDataArrayList count="2">
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="mzArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="16" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="1052" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="4208" />
+						<binary />
+					</binaryDataArray>
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="intensityArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="16848" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="1052" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="4208" />
+						<binary />
+					</binaryDataArray>
+				</binaryDataArrayList>
+			</spectrum>
+			<spectrum id="Spectrum=5" defaultArrayLength="0" index="5">
+				<referenceableParamGroupRef ref="spectrum1" />
+				<scanList count="1">
+					<cvParam cvRef="MS" accession="MS:1000795" name="no combination" value="" />
+					<scan instrumentConfigurationRef="IC1">
+						<referenceableParamGroupRef ref="scan1" />
+						<cvParam cvRef="IMS" accession="IMS:1000050" name="position x" value="4" />
+						<cvParam cvRef="IMS" accession="IMS:1000051" name="position y" value="1" />
+					</scan>
+				</scanList>
+				<binaryDataArrayList count="2">
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="mzArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="16" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="1052" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="4208" />
+						<binary />
+					</binaryDataArray>
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="intensityArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="21056" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="1052" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="4208" />
+						<binary />
+					</binaryDataArray>
+				</binaryDataArrayList>
+			</spectrum>
+			<spectrum id="Spectrum=6" defaultArrayLength="0" index="6">
+				<referenceableParamGroupRef ref="spectrum1" />
+				<scanList count="1">
+					<cvParam cvRef="MS" accession="MS:1000795" name="no combination" value="" />
+					<scan instrumentConfigurationRef="IC1">
+						<referenceableParamGroupRef ref="scan1" />
+						<cvParam cvRef="IMS" accession="IMS:1000050" name="position x" value="3" />
+						<cvParam cvRef="IMS" accession="IMS:1000051" name="position y" value="2" />
+					</scan>
+				</scanList>
+				<binaryDataArrayList count="2">
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="mzArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="16" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="1052" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="4208" />
+						<binary />
+					</binaryDataArray>
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="intensityArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="25264" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="1052" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="4208" />
+						<binary />
+					</binaryDataArray>
+				</binaryDataArrayList>
+			</spectrum>
+			<spectrum id="Spectrum=7" defaultArrayLength="0" index="7">
+				<referenceableParamGroupRef ref="spectrum1" />
+				<scanList count="1">
+					<cvParam cvRef="MS" accession="MS:1000795" name="no combination" value="" />
+					<scan instrumentConfigurationRef="IC1">
+						<referenceableParamGroupRef ref="scan1" />
+						<cvParam cvRef="IMS" accession="IMS:1000050" name="position x" value="4" />
+						<cvParam cvRef="IMS" accession="IMS:1000051" name="position y" value="2" />
+					</scan>
+				</scanList>
+				<binaryDataArrayList count="2">
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="mzArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="16" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="1052" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="4208" />
+						<binary />
+					</binaryDataArray>
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="intensityArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="29472" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="1052" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="4208" />
+						<binary />
+					</binaryDataArray>
+				</binaryDataArrayList>
+			</spectrum>
+			<spectrum id="Spectrum=8" defaultArrayLength="0" index="8">
+				<referenceableParamGroupRef ref="spectrum1" />
+				<scanList count="1">
+					<cvParam cvRef="MS" accession="MS:1000795" name="no combination" value="" />
+					<scan instrumentConfigurationRef="IC1">
+						<referenceableParamGroupRef ref="scan1" />
+						<cvParam cvRef="IMS" accession="IMS:1000050" name="position x" value="3" />
+						<cvParam cvRef="IMS" accession="IMS:1000051" name="position y" value="3" />
+					</scan>
+				</scanList>
+				<binaryDataArrayList count="2">
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="mzArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="16" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="1052" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="4208" />
+						<binary />
+					</binaryDataArray>
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="intensityArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="33680" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="1052" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="4208" />
+						<binary />
+					</binaryDataArray>
+				</binaryDataArrayList>
+			</spectrum>
+			<spectrum id="Spectrum=9" defaultArrayLength="0" index="9">
+				<referenceableParamGroupRef ref="spectrum1" />
+				<scanList count="1">
+					<cvParam cvRef="MS" accession="MS:1000795" name="no combination" value="" />
+					<scan instrumentConfigurationRef="IC1">
+						<referenceableParamGroupRef ref="scan1" />
+						<cvParam cvRef="IMS" accession="IMS:1000050" name="position x" value="4" />
+						<cvParam cvRef="IMS" accession="IMS:1000051" name="position y" value="3" />
+					</scan>
+				</scanList>
+				<binaryDataArrayList count="2">
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="mzArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="16" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="1052" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="4208" />
+						<binary />
+					</binaryDataArray>
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="intensityArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="37888" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="1052" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="4208" />
+						<binary />
+					</binaryDataArray>
+				</binaryDataArrayList>
+			</spectrum>
+			<spectrum id="Spectrum=10" defaultArrayLength="0" index="10">
+				<referenceableParamGroupRef ref="spectrum1" />
+				<scanList count="1">
+					<cvParam cvRef="MS" accession="MS:1000795" name="no combination" value="" />
+					<scan instrumentConfigurationRef="IC1">
+						<referenceableParamGroupRef ref="scan1" />
+						<cvParam cvRef="IMS" accession="IMS:1000050" name="position x" value="9" />
+						<cvParam cvRef="IMS" accession="IMS:1000051" name="position y" value="1" />
+					</scan>
+				</scanList>
+				<binaryDataArrayList count="2">
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="mzArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="16" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="1052" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="4208" />
+						<binary />
+					</binaryDataArray>
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="intensityArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="42096" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="1052" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="4208" />
+						<binary />
+					</binaryDataArray>
+				</binaryDataArrayList>
+			</spectrum>
+			<spectrum id="Spectrum=11" defaultArrayLength="0" index="11">
+				<referenceableParamGroupRef ref="spectrum1" />
+				<scanList count="1">
+					<cvParam cvRef="MS" accession="MS:1000795" name="no combination" value="" />
+					<scan instrumentConfigurationRef="IC1">
+						<referenceableParamGroupRef ref="scan1" />
+						<cvParam cvRef="IMS" accession="IMS:1000050" name="position x" value="9" />
+						<cvParam cvRef="IMS" accession="IMS:1000051" name="position y" value="2" />
+					</scan>
+				</scanList>
+				<binaryDataArrayList count="2">
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="mzArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="16" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="1052" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="4208" />
+						<binary />
+					</binaryDataArray>
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="intensityArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="46304" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="1052" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="4208" />
+						<binary />
+					</binaryDataArray>
+				</binaryDataArrayList>
+			</spectrum>
+			<spectrum id="Spectrum=12" defaultArrayLength="0" index="12">
+				<referenceableParamGroupRef ref="spectrum1" />
+				<scanList count="1">
+					<cvParam cvRef="MS" accession="MS:1000795" name="no combination" value="" />
+					<scan instrumentConfigurationRef="IC1">
+						<referenceableParamGroupRef ref="scan1" />
+						<cvParam cvRef="IMS" accession="IMS:1000050" name="position x" value="9" />
+						<cvParam cvRef="IMS" accession="IMS:1000051" name="position y" value="3" />
+					</scan>
+				</scanList>
+				<binaryDataArrayList count="2">
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="mzArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="16" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="1052" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="4208" />
+						<binary />
+					</binaryDataArray>
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="intensityArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="50512" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="1052" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="4208" />
+						<binary />
+					</binaryDataArray>
+				</binaryDataArrayList>
+			</spectrum>
+		</spectrumList>
+	</run>
+</mzML>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/preprocessing_results2.imzml.txt	Fri Feb 15 10:21:09 2019 -0500
@@ -0,0 +1,4 @@
+imzML file:
+total 80
+-rw-r--r-- 1 meli meli 54720 Feb 12 21:25 ibd
+-rw-r--r-- 1 meli meli 21132 Feb 12 21:25 imzml
Binary file test-data/preprocessing_results2.pdf has changed
--- a/test-data/preprocessing_results2.txt	Thu Oct 25 07:28:42 2018 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,297 +0,0 @@
-	x = 1, y = 1	x = 2, y = 1	x = 3, y = 1	x = 1, y = 2	x = 2, y = 2	x = 3, y = 2	x = 1, y = 3	x = 2, y = 3	x = 3, y = 3
-200.833343505859	0	0	0	0	29.7300018610011	0	20.3366320492341	0	0
-201.333343505859	0	0	0	0	0	0	0	0	0
-202	0	0	0	0	0	0	0	0	23.1435050872708
-202.833343505859	0	0	0	0	0	0	0	32.8864858064308	8.10338356295316
-203.833343505859	51.2049601068229	0	11.3700059373061	0	0	0	0	0	0
-204.16667175293	0	0	0	15.6578509107164	17.287114514836	0	29.3801156200759	0	0
-205.083343505859	28.0632538418884	0	0	14.0803616432178	0	0	0	0	0
-205.66667175293	0	0	0	0	0	0	0	0	0
-206.16667175293	0	0	0	0	0	0	0	0	0
-206.75	0	0	0	0	0	0	0	0	0
-207.25	0	0	0	0	0	0	0	0	0
-207.833343505859	0	0	0	0	0	0	0	0	0
-208.333343505859	0	0	0	0	0	0	0	0	0
-208.91667175293	0	0	0	0	0	0	0	0	0
-210.333343505859	0	0	16.0744032361685	0	0	0	0	0	0
-210.91667175293	0	15.9820002415152	0	0	0	0	0	0	0
-211.41667175293	0	0	0	0	0	0	0	0	0
-212	0	0	0	0	0	0	0	0	0
-212.5	0	0	0	0	0	0	0	0	0
-213.16667175293	0	15.2652007909183	0	10.8255187125352	0	0	0	19.8092361623607	26.1478463765446
-213.75	0	0	0	0	0	0	0	0	0
-214.25	0	0	0	0	0	0	0	0	0
-214.833343505859	0	0	20.2607669942264	0	0	0	0	0	22.2161013291355
-215.583343505859	0	0	0	0	0	0	0	0	0
-216.16667175293	0	18.3609620294097	0	0	0	0	0	0	0
-217	37.5783693521794	0	0	0	0	0	0	0	17.69680049
-217.91667175293	0	0	0	0	0	0	0	21.5182960927257	0
-218.5	0	0	0	0	0	0	0	0	0
-219	0	0	0	0	0	0	0	0	0
-219.583343505859	0	0	0	0	0	0	0	0	0
-220.16667175293	0	18.6457852489373	32.9506894838222	24.0912426231137	31.7570178011101	0	0	26.1970193149565	0
-220.75	0	0	0	0	0	0	0	0	0
-221.25	0	0	0	0	0	0	0	0	0
-222.16667175293	0	0	0	0	14.9277079269749	0	0	0	9.24959754459775
-222.833343505859	0	0	0	0	0	0	0	26.6440210634237	0
-223.083343505859	0	0	0	0	0	0	23.5238209819287	0	0
-224.083343505859	0	0	0	0	32.4650140432206	0	0	0	0
-225	20.8388438079399	0	0	0	0	0	0	0	0
-225.75	0	0	0	0	0	32.071221564219	0	0	0
-226.333343505859	30.367702170641	0	0	15.9340302645031	0	0	0	0	15.166781328744
-227.25	61.00694174083	18.2774565189601	33.1378572944533	14.1126101567404	60.3708882185737	69.1182306806	88.3890204657392	17.9301928152478	18.5442887505179
-228.25	0	0	0	19.7973152451708	29.1284464743225	0	48.1255937132277	0	11.2418187281387
-228.833343505859	0	0	0	0	39.2881990234499	0	0	23.571813759223	9.49534330127652
-230.16667175293	0	0	0	0	0	0	0	13.7350515954528	0
-230.66667175293	0	0	0	0	0	0	0	0	0
-232	0	31.5564252752125	39.7840997448739	19.5226243226405	0	0	17.545727945806	16.2769262883882	0
-233.25	0	0	23.2862438784232	0	0	0	28.5339722091309	29.9587504979069	0
-233.833343505859	0	0	0	0	0	0	0	0	0
-234.333343505859	0	0	0	0	0	0	0	0	0
-235.25	0	0	0	0	0	0	0	0	13.9555220480511
-236	0	22.7227304002729	0	0	0	0	0	0	0
-236.583343505859	0	0	0	0	0	0	0	0	0
-237.083343505859	0	18.0553170060993	0	0	0	0	0	0	0
-237.91667175293	0	0	0	0	0	0	0	17.1121940150021	0
-238.41667175293	0	0	0	0	0	0	0	0	0
-239	0	0	0	0	0	0	0	0	0
-239.583343505859	0	0	0	0	0	0	0	0	0
-240.083343505859	0	0	0	0	28.5240458569983	0	0	25.0985019862697	0
-241.333343505859	32.9293862937878	18.5131385791316	0	33.5594440580247	29.597702335892	0	52.7104324295036	24.0717290213301	31.8650142730283
-242.083343505859	0	17.787078739077	0	0	13.9279312472109	43.8891095673046	30.2546875982475	36.1208669086842	0
-243.083343505859	0	0	0	0	0	0	15.5592808318967	0	12.3958830399374
-243.66667175293	0	0	0	0	0	0	0	0	0
-244.16667175293	0	0	0	0	0	0	0	0	0
-244.833343505859	0	0	0	0	0	0	0	0	12.8490140044155
-245.333343505859	0	0	0	0	0	0	0	0	0
-246.083343505859	0	0	0	0	0	0	0	0	0
-246.66667175293	0	0	0	0	0	0	0	0	0
-247.66667175293	0	0	0	0	21.7950679804068	0	0	22.4977174800829	0
-248.16667175293	0	0	0	0	0	33.5978649704311	0	25.893190934143	0
-248.5	0	0	0	18.158696915579	0	0	0	0	0
-249.25	18.7903925680504	0	0	0	0	0	0	0	0
-249.833343505859	0	0	0	0	0	0	0	0	0
-250.583343505859	0	0	0	0	0	0	0	0	0
-251.16667175293	0	0	0	0	32.4071326541188	0	0	0	11.9615597726954
-251.75	0	0	0	0	0	0	0	0	0
-252.25	0	0	0	0	0	0	0	0	0
-253.16667175293	0	0	0	0	0	0	0	0	0
-253.66667175293	0	0	0	0	0	0	0	0	0
-254.16667175293	0	0	0	89.6617437279874	0	49.9875408969332	0	0	0
-255.25	131.915064270059	36.0118629316409	89.3729946550775	26.789729878941	63.0400919549187	136.212673794202	82.6823810888252	148.891162874674	17.9302301290777
-256.166656494141	0	0	0	0	19.5386428323032	38.2788095288529	45.5296112948813	0	21.6714253192929
-256.583343505859	0	0	24.9310967257321	0	21.3808168280601	32.1017447798208	0	0	0
-257	0	12.6889467145373	0	0	0	0	0	0	0
-257.583343505859	0	0	0	0	0	0	0	0	0
-258.083343505859	0	0	0	0	0	0	0	0	0
-259	0	0	0	0	0	19.760653114658	0	24.4679756860101	0
-259.25	0	19.6731187142247	0	0	0	19.2981102447311	0	0	0
-259.916656494141	50.6819428878362	0	0	0	0	0	0	0	0
-260.416656494141	0	0	0	0	0	0	0	0	0
-261.166656494141	0	0	0	26.1920356727312	0	23.9073605774917	19.1633388735779	16.2625803907316	7.66522197966506
-261.833343505859	0	0	0	0	0	58.433484150406	0	0	0
-263.083343505859	0	0	0	0	15.6759517880223	0	0	0	14.600736346103
-263.916656494141	0	0	0	0	0	0	0	21.0702768625085	0
-264.666656494141	0	0	0	0	0	0	0	0	0
-265.166656494141	0	0	24.1516815243633	0	0	0	0	0	0
-266.083343505859	0	0	0	0	20.677660067984	0	0	0	0
-266.666656494141	0	0	0	0	0	0	0	0	0
-267.25	0	0	0	0	0	0	0	0	0
-267.75	0	0	0	0	0	0	0	0	0
-268.25	0	0	0	0	0	0	0	0	0
-269.166656494141	0	18.1924229412806	0	0	0	60.5791844609723	31.4346219378178	0	17.9618431763256
-269.5	0	0	16.6096210009248	0	0	0	0	0	11.33617069307
-270.083343505859	0	0	0	0	0	0	0	0	0
-270.583343505859	0	0	0	0	0	0	0	0	0
-271.166687011719	0	0	39.4046653972178	0	0	0	0	0	0
-271.833343505859	0	0	0	0	0	0	21.1172527032363	0	0
-272.083343505859	0	0	11.5284346281119	0	0	0	0	0	0
-273.083343505859	0	11.4413580780541	31.9001105234814	0	0	32.3110728908127	20.9444923785154	21.5493813502257	28.1911995416037
-273.916687011719	0	17.0149984016732	14.0319007792838	0	0	0	20.3604439111219	0	0
-274.833343505859	0	0	0	0	0	24.3446775730628	0	0	0
-275.333343505859	0	0	0	0	0	0	0	0	0
-276	0	0	0	14.097612499202	0	0	0	0	0
-276.583343505859	0	0	0	0	0	0	0	0	0
-277.083343505859	0	0	0	0	0	0	0	0	0
-277.583343505859	0	0	0	0	0	0	0	0	0
-278.333343505859	0	0	0	0	0	17.7991855114254	0	0	0
-278.833343505859	0	0	26.9551719894119	0	0	0	0	0	0
-279.416687011719	0	0	0	0	0	0	0	0	0
-279.916687011719	0	0	0	0	0	0	0	0	0
-280.5	0	0	0	0	0	0	0	0	0
-281.083343505859	0	0	53.6475677485252	0	0	0	0	0	24.8697842602016
-281.583343505859	0	11.8334610903208	0	0	0	0	0	0	0
-282.166687011719	0	0	0	0	0	0	0	0	0
-283.416687011719	24.8961837175295	0	19.1674088531532	12.5880666932979	42.2923629949116	0	19.2009303674314	0	24.5703925252048
-284.333343505859	33.7679426908912	0	19.2572476078014	23.7758023139855	0	0	0	0	0
-284.833343505859	0	0	0	0	0	0	0	0	0
-285.583343505859	0	0	0	0	0	0	0	0	17.059425216311
-286.166687011719	0	0	0	0	0	0	0	0	0
-286.666687011719	0	0	0	0	0	0	0	0	0
-287.166687011719	0	0	0	0	0	0	0	0	0
-288	18.8508426305126	0	0	24.1447464331972	28.4721120729196	35.2390824321205	50.8844256155718	0	17.1668847042137
-289	0	40.2509493334669	21.5310289745647	40.2217420768139	18.7511077790053	45.2147888424695	0	14.1099266807434	21.4960725008078
-290.166687011719	0	0	0	11.5263443898997	16.4783123799376	0	0	23.6685236145059	22.6813736853536
-291.083343505859	0	0	0	0	0	0	0	0	23.6616392110308
-292	0	23.1882376160307	0	0	0	0	0	0	0
-292.5	0	0	0	0	0	0	0	0	0
-293.083343505859	0	0	0	0	0	0	0	0	0
-293.583343505859	0	0	0	0	0	0	0	0	0
-294.166687011719	0	0	0	27.9219664574176	0	0	0	0	0
-294.75	0	0	0	0	0	0	0	0	0
-295.25	0	0	0	0	0	0	0	0	0
-295.833343505859	0	0	0	0	0	0	0	0	0
-296.333343505859	0	0	0	0	0	0	0	0	0
-296.916687011719	0	0	0	0	0	0	0	0	0
-297.416687011719	0	0	0	0	0	0	0	0	0
-298	0	0	0	0	0	0	0	0	0
-298.916687011719	0	17.388648594888	0	0	0	0	0	0	0
-299.166687011719	0	15.540966814115	0	0	0	0	0	0	0
-300	0	0	0	0	47.3150386637789	0	0	0	0
-300.5	0	0	0	0	0	0	0	0	0
-301.083343505859	0	0	0	0	0	0	0	0	0
-301.583343505859	0	0	0	0	0	0	0	0	0
-302.166687011719	0	0	0	0	0	0	0	0	0
-302.833343505859	0	0	0	11.3526388573066	0	0	0	0	0
-303.333343505859	0	0	0	0	0	0	0	0	0
-304	21.6004094179763	0	0	0	25.5550994770839	0	0	0	21.0128999940314
-304.666687011719	0	0	24.8229112189508	0	0	0	18.3651794382246	22.762735774847	11.3742239299939
-305	0	0	0	0	0	0	47.0939734800317	0	0
-305.916687011719	0	13.641095977085	14.0328892763001	0	18.6911359408596	0	0	23.2431760792477	19.2829433556265
-307.083343505859	0	0	0	40.486491025881	27.7952080229158	0	0	13.9093994733916	49.9638795251359
-307.75	0	0	0	0	26.5867323803308	0	0	0	0
-308.25	0	18.4037245720986	0	0	0	0	0	31.447076390376	11.1373131350858
-308.833343505859	0	0	0	0	0	0	0	0	0
-309.333343505859	0	0	0	0	0	0	0	0	0
-309.833343505859	0	0	25.1713834887027	0	0	0	0	0	0
-310.416687011719	0	0	0	0	0	0	0	0	0
-310.916687011719	0	0	0	0	0	0	0	0	0
-311.5	0	17.4279156666268	0	0	0	0	0	0	0
-312.083343505859	0	0	0	0	0	0	0	0	0
-312.583343505859	0	0	0	0	0	0	0	0	0
-313.166687011719	0	0	0	0	0	0	0	16.7375093356531	0
-314	0	15.8152033971551	0	0	0	0	0	0	0
-314.75	0	0	26.1746522702503	0	0	0	0	0	0
-315.916687011719	23.0159868975955	0	0	0	0	0	0	16.5473428891037	0
-316.25	0	0	0	14.7674078101308	0	0	0	0	0
-316.833343505859	0	0	0	0	0	0	0	0	0
-317.333343505859	0	0	0	0	0	0	0	0	0
-318.416687011719	0	0	31.5571005118899	0	0	0	0	0	0
-319	0	0	0	0	0	0	0	0	0
-319.5	0	0	0	0	0	0	0	0	0
-320.083343505859	0	0	0	0	0	0	0	0	0
-320.916687011719	0	0	0	0	0	0	17.2063981455081	0	0
-321.25	0	0	0	0	0	0	0	14.6340353977952	0
-321.833343505859	0	0	0	0	0	0	0	0	0
-322.75	0	0	0	0	0	0	21.1392711376049	0	0
-323.333343505859	0	0	0	0	0	0	0	0	0
-323.833343505859	0	0	0	0	0	0	0	0	0
-324.5	0	0	0	0	0	23.767241975866	0	0	0
-325.083343505859	0	0	0	0	0	0	0	0	0
-325.833343505859	0	0	0	0	0	0	0	0	17.0992750462056
-327.083343505859	29.3531263338347	0	24.5277590042176	54.3755799110328	0	0	22.5510020682588	0	26.2633710046304
-328	33.1654860331077	0	23.5855573716755	24.6316789340459	22.1786320807712	0	0	60.6529439449451	20.9410259972161
-328.916687011719	170.839341619124	93.266293186105	74.3091416643935	108.33593358685	147.635192491855	77.1391442762394	48.8785630824543	66.2479451841757	59.4965278255317
-330.083343505859	0	13.42174899679	0	22.3112283063605	0	29.977559433679	34.1513278723624	43.8310461009907	0
-330.583343505859	0	0	0	0	0	0	0	0	0
-331.25	0	0	0	0	0	0	0	0	0
-331.75	0	0	0	0	0	0	0	0	0
-332.25	0	0	0	0	0	0	0	0	0
-332.916687011719	0	21.83569629728	0	0	0	0	0	0	0
-333.5	0	0	0	0	0	0	0	0	0
-334.166687011719	0	0	0	0	0	20.8181516027206	0	0	0
-334.916687011719	0	0	0	0	0	0	30.2348757062526	0	0
-335.333343505859	0	0	11.4905399220725	0	0	0	0	0	0
-335.916687011719	0	0	0	0	0	0	0	0	0
-337.083343505859	0	0	0	0	0	0	24.0761653316155	0	0
-337.666687011719	0	0	0	0	0	0	0	0	0
-338.166687011719	0	0	0	0	0	0	0	0	0
-338.666687011719	0	0	0	0	0	0	0	0	0
-339.416687011719	0	0	0	0	39.8603419770766	0	0	0	0
-339.916687011719	0	0	0	0	20.858069520381	0	0	0	0
-340.416687011719	0	0	0	0	0	0	0	0	0
-341	0	0	0	0	0	0	0	0	0
-341.5	0	0	0	0	0	0	0	0	0
-342.333343505859	0	0	0	0	0	0	0	0	19.6664686760846
-343	0	24.9136218471955	0	32.344625078576	0	0	30.0229321228603	0	0
-344	0	38.4142619483613	0	51.4185116656209	15.7674653573169	0	0	31.3565353900891	29.5640946328953
-345	89.440808882377	64.3979976515781	69.0676509315537	28.9295335285171	28.9161160500209	82.4933661280555	43.6333514610303	42.8223438499387	23.3642044056771
-345.5	0	17.9053906829632	0	0	26.7716187236005	0	0	22.3332379850821	58.1091304877784
-346	0	56.3824132218771	0	39.0036223920686	0	22.0938155709768	0	0	24.1426944514917
-346.916687011719	0	20.8340351852125	0	22.6652681842216	14.8696905661875	0	0	15.618325524579	0
-350.083343505859	0	14.2632499913526	0	0	0	0	0	0	0
-350.666687011719	0	0	0	0	0	0	0	0	0
-351.166687011719	0	0	0	0	0	0	0	0	0
-351.75	0	0	0	0	0	0	0	0	0
-352.25	0	0	0	0	0	0	0	0	0
-353.083343505859	0	0	0	0	0	0	16.8234524228888	0	0
-353.583343505859	0	0	0	0	0	0	0	0	0
-354.166687011719	0	0	0	0	0	0	0	0	0
-355.333343505859	0	0	0	0	0	0	18.490727196134	0	22.5833915337106
-355.916687011719	0	0	0	15.6092670198485	0	0	0	0	0
-356.416687011719	0	0	0	0	0	0	0	0	0
-356.916687011719	0	0	0	0	0	0	25.8992783836766	0	0
-357.333343505859	0	0	0	0	0	0	0	19.7877173158758	0
-357.833343505859	0	0	0	0	0	0	0	0	0
-358.416687011719	0	0	0	0	0	0	0	0	0
-358.916687011719	0	0	0	0	0	0	0	0	0
-359.416687011719	0	0	0	0	0	0	0	0	0
-359.916687011719	0	0	15.2291980667164	0	14.8664189209361	0	0	0	0
-360.916687011719	32.9744131371326	0	0	0	0	0	0	0	0
-361.5	0	0	0	0	0	0	0	0	0
-362	0	0	0	0	0	0	0	0	0
-362.5	0	0	0	0	0	0	0	0	0
-363.083343505859	0	0	0	0	0	0	0	0	0
-363.583343505859	0	0	0	0	0	0	0	0	0
-364.333343505859	57.7406498654606	0	0	0	0	0	0	0	0
-364.833343505859	0	0	0	0	0	0	0	0	0
-365.833343505859	0	0	0	23.7421226644684	46.0960367777783	0	19.4362629084055	0	0
-366.666687011719	0	0	0	0	0	0	0	0	0
-367.916687011719	0	31.1089967560267	0	0	0	0	0	0	0
-368.416687011719	0	0	0	0	0	0	0	0	0
-369.083343505859	0	23.2062449204231	0	0	0	0	0	0	0
-370.333343505859	30.8381452757664	0	49.5953209142812	0	0	0	0	19.4647918141462	0
-370.916687011719	0	0	0	0	0	0	0	0	0
-371.416687011719	0	0	0	0	0	0	0	0	0
-372	0	0	0	0	0	0	0	0	0
-372.5	0	0	0	0	0	0	0	0	0
-373.083343505859	0	0	0	0	0	0	0	0	0
-373.583343505859	0	0	0	0	0	0	0	0	0
-374.5	0	0	0	0	0	0	0	0	0
-375.083343505859	0	0	0	0	0	0	0	0	0
-376	0	0	0	0	0	0	0	0	0
-376.833343505859	0	0	0	0	0	0	0	0	12.4108436848343
-377.416687011719	0	0	0	0	0	0	0	0	0
-377.916687011719	0	0	0	0	0	0	0	0	0
-378.75	0	12.4414396381466	0	0	0	0	0	0	0
-379.5	0	0	21.5287688898373	0	0	0	0	0	0
-380.083343505859	0	0	0	0	0	0	0	0	0
-380.75	0	0	0	0	0	0	0	0	0
-381.25	0	0	0	0	0	0	0	0	0
-381.833343505859	0	0	0	0	0	0	0	0	0
-382.583343505859	0	0	0	0	20.7893695949884	0	0	0	0
-383.166687011719	0	0	0	0	36.2220726623636	0	0	0	0
-383.666687011719	0	0	0	0	0	0	0	0	0
-384.25	0	0	0	0	0	0	0	0	0
-384.75	0	0	0	0	0	0	0	0	0
-385.333343505859	0	0	0	0	0	0	0	0	0
-385.833343505859	0	0	0	0	0	0	0	0	0
-386.75	0	0	0	0	0	0	0	14.7399918416133	0
-387.166687011719	0	0	0	0	0	0	0	0	22.0763041955615
-387.5	0	0	21.1178263931554	0	0	15.3290299771848	0	0	0
-388.25	0	0	0	0	0	0	0	0	0
-389.333343505859	0	0	0	0	0	0	0	0	0
-390.166687011719	0	0	0	0	0	21.9188439739601	0	0	0
-391.083343505859	0	0	0	0	0	24.0561456663434	0	0	0
-392	0	0	0	0	0	42.9985558418334	0	0	0
-392.833343505859	0	0	41.1465765853643	0	0	0	0	0	0
-393.583343505859	0	0	0	0	0	0	0	20.4528870846676	0
-394.083343505859	0	0	0	0	0	0	0	0	0
-395.166687011719	0	0	12.4535077266748	0	0	0	0	0	10.7085862343913
-395.916687011719	0	0	0	21.3907076844532	0	0	0	0	0
-396.5	0	0	0	0	0	0	0	0	0
-397.083343505859	0	0	0	0	0	0	0	0	0
-397.666687011719	0	0	0	0	0	0	0	0	0
-398.166687011719	0	0	22.2442721127594	0	0	0	0	0	0
-398.75	0	0	12.1748320091567	26.8513023565384	0	0	0	0	0
-399.333343505859	0	0	0	0	0	0	0	0	0
Binary file test-data/preprocessing_results3.RData has changed
Binary file test-data/preprocessing_results3.ibd has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/preprocessing_results3.imzml	Fri Feb 15 10:21:09 2019 -0500
@@ -0,0 +1,313 @@
+<?xml version="1.0"?>
+<mzML version="1.1" xmlns="http://psi.hupo.org/ms/mzml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://psi.hupo.org/ms/mzml http://psidev.info/files/ms/mzML/xsd/mzML1.1.0_idx.xsd">
+	<cvList count="3">
+		<cv id="MS" fullName="Proteomics Standards Initiative Mass Spectrometry Ontology" version="1.3.1" URI="http://psidev.info/ms/mzML/psi-ms.obo" />
+		<cv id="UO" fullName="Unit Ontology" version="1.15" URI="http://obo.cvs.sourceforge.net/obo/obo/ontology/phenotype/unit.obo" />
+		<cv id="IMS" fullName="Imaging MS Ontology" version="0.9.1" URI="http://www.maldi-msi.org/download/imzml/imagingMS.obo" />
+	</cvList>
+	<fileDescription>
+		<fileContent>
+			<cvParam cvRef="MS" accession="MS:1000579" name="MS1 spectrum" value="" />
+			<cvParam cvRef="MS" accession="MS:1000127" name="centroid spectrum" value="" />
+			<cvParam cvRef="IMS" accession="IMS:1000080" name="universally unique identifier" value="{4C387879-DE12-49A4-878F-6980D6F7C6F0}" />
+			<cvParam cvRef="IMS" accession="IMS:1000091" name="ibd SHA-1" value="94ED775BCF16644D23DACFCA1E62D28D5C755178" />
+			<cvParam cvRef="IMS" accession="IMS:1000030" name="continuous" value="" />
+		</fileContent>
+	</fileDescription>
+	<referenceableParamGroupList count="4">
+		<referenceableParamGroup id="spectrum1">
+			<cvParam cvRef="MS" accession="MS:1000579" name="MS1 spectrum" value="" />
+			<cvParam cvRef="MS" accession="MS:1000511" name="ms level" value="0" />
+			<cvParam cvRef="MS" accession="MS:1000127" name="centroid spectrum" value="" />
+		</referenceableParamGroup>
+		<referenceableParamGroup id="scan1">
+			<cvParam cvRef="MS" accession="MS:1000093" name="increasing m/z scan" value="" />
+			<cvParam cvRef="MS" accession="MS:1000095" name="linear" value="" />
+		</referenceableParamGroup>
+		<referenceableParamGroup id="mzArray">
+			<cvParam cvRef="MS" accession="MS:1000576" name="no compression" value="" />
+			<cvParam cvRef="MS" accession="MS:1000514" name="m/z array" value="" unitCvRef="MS" unitAccession="MS:1000040" unitName="m/z" />
+			<cvParam cvRef="IMS" accession="IMS:1000101" name="external data" value="true" />
+			<cvParam cvRef="MS" accession="MS:1000521" name="32-bit float" value="32-bit float" />
+		</referenceableParamGroup>
+		<referenceableParamGroup id="intensityArray">
+			<cvParam cvRef="MS" accession="MS:1000576" name="no compression" value="" />
+			<cvParam cvRef="MS" accession="MS:1000515" name="intensity array" value="" unitCvRef="MS" unitAccession="MS:1000131" unitName="number of counts" />
+			<cvParam cvRef="IMS" accession="IMS:1000101" name="external data" value="true" />
+			<cvParam cvRef="MS" accession="MS:1000521" name="32-bit float" value="32-bit float" />
+		</referenceableParamGroup>
+	</referenceableParamGroupList>
+	<sampleList count="1">
+		<sample id="sample1" name="Sample1">
+			<cvParam cvRef="MS" accession="MS:1000001" name="sample number" value="1" />
+		</sample>
+	</sampleList>
+	<softwareList count="1">
+		<software id="Cardinal" version="1.12.1">
+			<cvParam cvRef="MS" accession="MS:1000799" name="custom unreleased software tool" value="" />
+		</software>
+	</softwareList>
+	<scanSettingsList count="1">
+		<scanSettings id="scansettings1">
+			<cvParam cvRef="IMS" accession="IMS:1000042" name="max count of pixel x" value="3" />
+			<cvParam cvRef="IMS" accession="IMS:1000043" name="max count of pixel y" value="3" />
+		</scanSettings>
+	</scanSettingsList>
+	<instrumentConfigurationList count="1">
+		<instrumentConfiguration id="IC1" />
+	</instrumentConfigurationList>
+	<dataProcessingList count="1">
+		<dataProcessing id="CardinalWriteImzML">
+			<processingMethod order="1" softwareRef="Cardinal">
+				<cvParam cvRef="MS" accession="MS:1000544" name="Conversion to mzML" value="" />
+			</processingMethod>
+		</dataProcessing>
+	</dataProcessingList>
+	<run defaultInstrumentConfigurationRef="IC1" id="Experiment01" sampleRef="sample1">
+		<spectrumList count="9" defaultDataProcessingRef="CardinalWriteImzML">
+			<spectrum id="Spectrum=1" defaultArrayLength="0" index="1">
+				<referenceableParamGroupRef ref="spectrum1" />
+				<scanList count="1">
+					<cvParam cvRef="MS" accession="MS:1000795" name="no combination" value="" />
+					<scan instrumentConfigurationRef="IC1">
+						<referenceableParamGroupRef ref="scan1" />
+						<cvParam cvRef="IMS" accession="IMS:1000050" name="position x" value="1" />
+						<cvParam cvRef="IMS" accession="IMS:1000051" name="position y" value="1" />
+					</scan>
+				</scanList>
+				<binaryDataArrayList count="2">
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="mzArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="16" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="355" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="1420" />
+						<binary />
+					</binaryDataArray>
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="intensityArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="1436" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="355" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="1420" />
+						<binary />
+					</binaryDataArray>
+				</binaryDataArrayList>
+			</spectrum>
+			<spectrum id="Spectrum=2" defaultArrayLength="0" index="2">
+				<referenceableParamGroupRef ref="spectrum1" />
+				<scanList count="1">
+					<cvParam cvRef="MS" accession="MS:1000795" name="no combination" value="" />
+					<scan instrumentConfigurationRef="IC1">
+						<referenceableParamGroupRef ref="scan1" />
+						<cvParam cvRef="IMS" accession="IMS:1000050" name="position x" value="2" />
+						<cvParam cvRef="IMS" accession="IMS:1000051" name="position y" value="1" />
+					</scan>
+				</scanList>
+				<binaryDataArrayList count="2">
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="mzArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="16" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="355" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="1420" />
+						<binary />
+					</binaryDataArray>
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="intensityArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="2856" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="355" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="1420" />
+						<binary />
+					</binaryDataArray>
+				</binaryDataArrayList>
+			</spectrum>
+			<spectrum id="Spectrum=3" defaultArrayLength="0" index="3">
+				<referenceableParamGroupRef ref="spectrum1" />
+				<scanList count="1">
+					<cvParam cvRef="MS" accession="MS:1000795" name="no combination" value="" />
+					<scan instrumentConfigurationRef="IC1">
+						<referenceableParamGroupRef ref="scan1" />
+						<cvParam cvRef="IMS" accession="IMS:1000050" name="position x" value="3" />
+						<cvParam cvRef="IMS" accession="IMS:1000051" name="position y" value="1" />
+					</scan>
+				</scanList>
+				<binaryDataArrayList count="2">
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="mzArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="16" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="355" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="1420" />
+						<binary />
+					</binaryDataArray>
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="intensityArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="4276" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="355" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="1420" />
+						<binary />
+					</binaryDataArray>
+				</binaryDataArrayList>
+			</spectrum>
+			<spectrum id="Spectrum=4" defaultArrayLength="0" index="4">
+				<referenceableParamGroupRef ref="spectrum1" />
+				<scanList count="1">
+					<cvParam cvRef="MS" accession="MS:1000795" name="no combination" value="" />
+					<scan instrumentConfigurationRef="IC1">
+						<referenceableParamGroupRef ref="scan1" />
+						<cvParam cvRef="IMS" accession="IMS:1000050" name="position x" value="1" />
+						<cvParam cvRef="IMS" accession="IMS:1000051" name="position y" value="2" />
+					</scan>
+				</scanList>
+				<binaryDataArrayList count="2">
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="mzArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="16" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="355" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="1420" />
+						<binary />
+					</binaryDataArray>
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="intensityArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="5696" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="355" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="1420" />
+						<binary />
+					</binaryDataArray>
+				</binaryDataArrayList>
+			</spectrum>
+			<spectrum id="Spectrum=5" defaultArrayLength="0" index="5">
+				<referenceableParamGroupRef ref="spectrum1" />
+				<scanList count="1">
+					<cvParam cvRef="MS" accession="MS:1000795" name="no combination" value="" />
+					<scan instrumentConfigurationRef="IC1">
+						<referenceableParamGroupRef ref="scan1" />
+						<cvParam cvRef="IMS" accession="IMS:1000050" name="position x" value="2" />
+						<cvParam cvRef="IMS" accession="IMS:1000051" name="position y" value="2" />
+					</scan>
+				</scanList>
+				<binaryDataArrayList count="2">
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="mzArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="16" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="355" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="1420" />
+						<binary />
+					</binaryDataArray>
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="intensityArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="7116" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="355" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="1420" />
+						<binary />
+					</binaryDataArray>
+				</binaryDataArrayList>
+			</spectrum>
+			<spectrum id="Spectrum=6" defaultArrayLength="0" index="6">
+				<referenceableParamGroupRef ref="spectrum1" />
+				<scanList count="1">
+					<cvParam cvRef="MS" accession="MS:1000795" name="no combination" value="" />
+					<scan instrumentConfigurationRef="IC1">
+						<referenceableParamGroupRef ref="scan1" />
+						<cvParam cvRef="IMS" accession="IMS:1000050" name="position x" value="3" />
+						<cvParam cvRef="IMS" accession="IMS:1000051" name="position y" value="2" />
+					</scan>
+				</scanList>
+				<binaryDataArrayList count="2">
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="mzArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="16" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="355" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="1420" />
+						<binary />
+					</binaryDataArray>
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="intensityArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="8536" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="355" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="1420" />
+						<binary />
+					</binaryDataArray>
+				</binaryDataArrayList>
+			</spectrum>
+			<spectrum id="Spectrum=7" defaultArrayLength="0" index="7">
+				<referenceableParamGroupRef ref="spectrum1" />
+				<scanList count="1">
+					<cvParam cvRef="MS" accession="MS:1000795" name="no combination" value="" />
+					<scan instrumentConfigurationRef="IC1">
+						<referenceableParamGroupRef ref="scan1" />
+						<cvParam cvRef="IMS" accession="IMS:1000050" name="position x" value="1" />
+						<cvParam cvRef="IMS" accession="IMS:1000051" name="position y" value="3" />
+					</scan>
+				</scanList>
+				<binaryDataArrayList count="2">
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="mzArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="16" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="355" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="1420" />
+						<binary />
+					</binaryDataArray>
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="intensityArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="9956" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="355" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="1420" />
+						<binary />
+					</binaryDataArray>
+				</binaryDataArrayList>
+			</spectrum>
+			<spectrum id="Spectrum=8" defaultArrayLength="0" index="8">
+				<referenceableParamGroupRef ref="spectrum1" />
+				<scanList count="1">
+					<cvParam cvRef="MS" accession="MS:1000795" name="no combination" value="" />
+					<scan instrumentConfigurationRef="IC1">
+						<referenceableParamGroupRef ref="scan1" />
+						<cvParam cvRef="IMS" accession="IMS:1000050" name="position x" value="2" />
+						<cvParam cvRef="IMS" accession="IMS:1000051" name="position y" value="3" />
+					</scan>
+				</scanList>
+				<binaryDataArrayList count="2">
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="mzArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="16" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="355" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="1420" />
+						<binary />
+					</binaryDataArray>
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="intensityArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="11376" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="355" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="1420" />
+						<binary />
+					</binaryDataArray>
+				</binaryDataArrayList>
+			</spectrum>
+			<spectrum id="Spectrum=9" defaultArrayLength="0" index="9">
+				<referenceableParamGroupRef ref="spectrum1" />
+				<scanList count="1">
+					<cvParam cvRef="MS" accession="MS:1000795" name="no combination" value="" />
+					<scan instrumentConfigurationRef="IC1">
+						<referenceableParamGroupRef ref="scan1" />
+						<cvParam cvRef="IMS" accession="IMS:1000050" name="position x" value="3" />
+						<cvParam cvRef="IMS" accession="IMS:1000051" name="position y" value="3" />
+					</scan>
+				</scanList>
+				<binaryDataArrayList count="2">
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="mzArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="16" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="355" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="1420" />
+						<binary />
+					</binaryDataArray>
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="intensityArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="12796" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="355" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="1420" />
+						<binary />
+					</binaryDataArray>
+				</binaryDataArrayList>
+			</spectrum>
+		</spectrumList>
+	</run>
+</mzML>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/preprocessing_results3.imzml.txt	Fri Feb 15 10:21:09 2019 -0500
@@ -0,0 +1,4 @@
+imzML file:
+total 36
+-rw-r--r-- 1 meli meli 14216 Feb 12 21:26 ibd
+-rw-r--r-- 1 meli meli 16824 Feb 12 21:26 imzml
Binary file test-data/preprocessing_results3.pdf has changed
Binary file test-data/preprocessing_results4.RData has changed
Binary file test-data/preprocessing_results4.ibd has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/preprocessing_results4.imzml	Fri Feb 15 10:21:09 2019 -0500
@@ -0,0 +1,313 @@
+<?xml version="1.0"?>
+<mzML version="1.1" xmlns="http://psi.hupo.org/ms/mzml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://psi.hupo.org/ms/mzml http://psidev.info/files/ms/mzML/xsd/mzML1.1.0_idx.xsd">
+	<cvList count="3">
+		<cv id="MS" fullName="Proteomics Standards Initiative Mass Spectrometry Ontology" version="1.3.1" URI="http://psidev.info/ms/mzML/psi-ms.obo" />
+		<cv id="UO" fullName="Unit Ontology" version="1.15" URI="http://obo.cvs.sourceforge.net/obo/obo/ontology/phenotype/unit.obo" />
+		<cv id="IMS" fullName="Imaging MS Ontology" version="0.9.1" URI="http://www.maldi-msi.org/download/imzml/imagingMS.obo" />
+	</cvList>
+	<fileDescription>
+		<fileContent>
+			<cvParam cvRef="MS" accession="MS:1000579" name="MS1 spectrum" value="" />
+			<cvParam cvRef="MS" accession="MS:1000128" name="profile spectrum" value="" />
+			<cvParam cvRef="IMS" accession="IMS:1000080" name="universally unique identifier" value="{26018306-9D72-49F5-89CB-68E4DDE0527C}" />
+			<cvParam cvRef="IMS" accession="IMS:1000091" name="ibd SHA-1" value="BA6411EC5A5A59ABE5BD7005F4ED8FCEBA775A8E" />
+			<cvParam cvRef="IMS" accession="IMS:1000030" name="continuous" value="" />
+		</fileContent>
+	</fileDescription>
+	<referenceableParamGroupList count="4">
+		<referenceableParamGroup id="spectrum1">
+			<cvParam cvRef="MS" accession="MS:1000579" name="MS1 spectrum" value="" />
+			<cvParam cvRef="MS" accession="MS:1000511" name="ms level" value="0" />
+			<cvParam cvRef="MS" accession="MS:1000128" name="profile spectrum" value="" />
+		</referenceableParamGroup>
+		<referenceableParamGroup id="scan1">
+			<cvParam cvRef="MS" accession="MS:1000093" name="increasing m/z scan" value="" />
+			<cvParam cvRef="MS" accession="MS:1000095" name="linear" value="" />
+		</referenceableParamGroup>
+		<referenceableParamGroup id="mzArray">
+			<cvParam cvRef="MS" accession="MS:1000576" name="no compression" value="" />
+			<cvParam cvRef="MS" accession="MS:1000514" name="m/z array" value="" unitCvRef="MS" unitAccession="MS:1000040" unitName="m/z" />
+			<cvParam cvRef="IMS" accession="IMS:1000101" name="external data" value="true" />
+			<cvParam cvRef="MS" accession="MS:1000521" name="32-bit float" value="32-bit float" />
+		</referenceableParamGroup>
+		<referenceableParamGroup id="intensityArray">
+			<cvParam cvRef="MS" accession="MS:1000576" name="no compression" value="" />
+			<cvParam cvRef="MS" accession="MS:1000515" name="intensity array" value="" unitCvRef="MS" unitAccession="MS:1000131" unitName="number of counts" />
+			<cvParam cvRef="IMS" accession="IMS:1000101" name="external data" value="true" />
+			<cvParam cvRef="MS" accession="MS:1000521" name="32-bit float" value="32-bit float" />
+		</referenceableParamGroup>
+	</referenceableParamGroupList>
+	<sampleList count="1">
+		<sample id="sample1" name="Sample1">
+			<cvParam cvRef="MS" accession="MS:1000001" name="sample number" value="1" />
+		</sample>
+	</sampleList>
+	<softwareList count="1">
+		<software id="Cardinal" version="1.12.1">
+			<cvParam cvRef="MS" accession="MS:1000799" name="custom unreleased software tool" value="" />
+		</software>
+	</softwareList>
+	<scanSettingsList count="1">
+		<scanSettings id="scansettings1">
+			<cvParam cvRef="IMS" accession="IMS:1000042" name="max count of pixel x" value="3" />
+			<cvParam cvRef="IMS" accession="IMS:1000043" name="max count of pixel y" value="3" />
+		</scanSettings>
+	</scanSettingsList>
+	<instrumentConfigurationList count="1">
+		<instrumentConfiguration id="IC1" />
+	</instrumentConfigurationList>
+	<dataProcessingList count="1">
+		<dataProcessing id="CardinalWriteImzML">
+			<processingMethod order="1" softwareRef="Cardinal">
+				<cvParam cvRef="MS" accession="MS:1000544" name="Conversion to mzML" value="" />
+			</processingMethod>
+		</dataProcessing>
+	</dataProcessingList>
+	<run defaultInstrumentConfigurationRef="IC1" id="Experiment01" sampleRef="sample1">
+		<spectrumList count="9" defaultDataProcessingRef="CardinalWriteImzML">
+			<spectrum id="Spectrum=1" defaultArrayLength="0" index="1">
+				<referenceableParamGroupRef ref="spectrum1" />
+				<scanList count="1">
+					<cvParam cvRef="MS" accession="MS:1000795" name="no combination" value="" />
+					<scan instrumentConfigurationRef="IC1">
+						<referenceableParamGroupRef ref="scan1" />
+						<cvParam cvRef="IMS" accession="IMS:1000050" name="position x" value="1" />
+						<cvParam cvRef="IMS" accession="IMS:1000051" name="position y" value="1" />
+					</scan>
+				</scanList>
+				<binaryDataArrayList count="2">
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="mzArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="16" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="159" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="636" />
+						<binary />
+					</binaryDataArray>
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="intensityArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="652" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="159" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="636" />
+						<binary />
+					</binaryDataArray>
+				</binaryDataArrayList>
+			</spectrum>
+			<spectrum id="Spectrum=2" defaultArrayLength="0" index="2">
+				<referenceableParamGroupRef ref="spectrum1" />
+				<scanList count="1">
+					<cvParam cvRef="MS" accession="MS:1000795" name="no combination" value="" />
+					<scan instrumentConfigurationRef="IC1">
+						<referenceableParamGroupRef ref="scan1" />
+						<cvParam cvRef="IMS" accession="IMS:1000050" name="position x" value="2" />
+						<cvParam cvRef="IMS" accession="IMS:1000051" name="position y" value="1" />
+					</scan>
+				</scanList>
+				<binaryDataArrayList count="2">
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="mzArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="16" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="159" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="636" />
+						<binary />
+					</binaryDataArray>
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="intensityArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="1288" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="159" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="636" />
+						<binary />
+					</binaryDataArray>
+				</binaryDataArrayList>
+			</spectrum>
+			<spectrum id="Spectrum=3" defaultArrayLength="0" index="3">
+				<referenceableParamGroupRef ref="spectrum1" />
+				<scanList count="1">
+					<cvParam cvRef="MS" accession="MS:1000795" name="no combination" value="" />
+					<scan instrumentConfigurationRef="IC1">
+						<referenceableParamGroupRef ref="scan1" />
+						<cvParam cvRef="IMS" accession="IMS:1000050" name="position x" value="3" />
+						<cvParam cvRef="IMS" accession="IMS:1000051" name="position y" value="1" />
+					</scan>
+				</scanList>
+				<binaryDataArrayList count="2">
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="mzArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="16" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="159" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="636" />
+						<binary />
+					</binaryDataArray>
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="intensityArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="1924" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="159" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="636" />
+						<binary />
+					</binaryDataArray>
+				</binaryDataArrayList>
+			</spectrum>
+			<spectrum id="Spectrum=4" defaultArrayLength="0" index="4">
+				<referenceableParamGroupRef ref="spectrum1" />
+				<scanList count="1">
+					<cvParam cvRef="MS" accession="MS:1000795" name="no combination" value="" />
+					<scan instrumentConfigurationRef="IC1">
+						<referenceableParamGroupRef ref="scan1" />
+						<cvParam cvRef="IMS" accession="IMS:1000050" name="position x" value="1" />
+						<cvParam cvRef="IMS" accession="IMS:1000051" name="position y" value="2" />
+					</scan>
+				</scanList>
+				<binaryDataArrayList count="2">
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="mzArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="16" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="159" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="636" />
+						<binary />
+					</binaryDataArray>
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="intensityArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="2560" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="159" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="636" />
+						<binary />
+					</binaryDataArray>
+				</binaryDataArrayList>
+			</spectrum>
+			<spectrum id="Spectrum=5" defaultArrayLength="0" index="5">
+				<referenceableParamGroupRef ref="spectrum1" />
+				<scanList count="1">
+					<cvParam cvRef="MS" accession="MS:1000795" name="no combination" value="" />
+					<scan instrumentConfigurationRef="IC1">
+						<referenceableParamGroupRef ref="scan1" />
+						<cvParam cvRef="IMS" accession="IMS:1000050" name="position x" value="2" />
+						<cvParam cvRef="IMS" accession="IMS:1000051" name="position y" value="2" />
+					</scan>
+				</scanList>
+				<binaryDataArrayList count="2">
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="mzArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="16" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="159" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="636" />
+						<binary />
+					</binaryDataArray>
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="intensityArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="3196" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="159" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="636" />
+						<binary />
+					</binaryDataArray>
+				</binaryDataArrayList>
+			</spectrum>
+			<spectrum id="Spectrum=6" defaultArrayLength="0" index="6">
+				<referenceableParamGroupRef ref="spectrum1" />
+				<scanList count="1">
+					<cvParam cvRef="MS" accession="MS:1000795" name="no combination" value="" />
+					<scan instrumentConfigurationRef="IC1">
+						<referenceableParamGroupRef ref="scan1" />
+						<cvParam cvRef="IMS" accession="IMS:1000050" name="position x" value="3" />
+						<cvParam cvRef="IMS" accession="IMS:1000051" name="position y" value="2" />
+					</scan>
+				</scanList>
+				<binaryDataArrayList count="2">
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="mzArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="16" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="159" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="636" />
+						<binary />
+					</binaryDataArray>
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="intensityArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="3832" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="159" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="636" />
+						<binary />
+					</binaryDataArray>
+				</binaryDataArrayList>
+			</spectrum>
+			<spectrum id="Spectrum=7" defaultArrayLength="0" index="7">
+				<referenceableParamGroupRef ref="spectrum1" />
+				<scanList count="1">
+					<cvParam cvRef="MS" accession="MS:1000795" name="no combination" value="" />
+					<scan instrumentConfigurationRef="IC1">
+						<referenceableParamGroupRef ref="scan1" />
+						<cvParam cvRef="IMS" accession="IMS:1000050" name="position x" value="1" />
+						<cvParam cvRef="IMS" accession="IMS:1000051" name="position y" value="3" />
+					</scan>
+				</scanList>
+				<binaryDataArrayList count="2">
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="mzArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="16" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="159" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="636" />
+						<binary />
+					</binaryDataArray>
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="intensityArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="4468" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="159" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="636" />
+						<binary />
+					</binaryDataArray>
+				</binaryDataArrayList>
+			</spectrum>
+			<spectrum id="Spectrum=8" defaultArrayLength="0" index="8">
+				<referenceableParamGroupRef ref="spectrum1" />
+				<scanList count="1">
+					<cvParam cvRef="MS" accession="MS:1000795" name="no combination" value="" />
+					<scan instrumentConfigurationRef="IC1">
+						<referenceableParamGroupRef ref="scan1" />
+						<cvParam cvRef="IMS" accession="IMS:1000050" name="position x" value="2" />
+						<cvParam cvRef="IMS" accession="IMS:1000051" name="position y" value="3" />
+					</scan>
+				</scanList>
+				<binaryDataArrayList count="2">
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="mzArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="16" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="159" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="636" />
+						<binary />
+					</binaryDataArray>
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="intensityArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="5104" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="159" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="636" />
+						<binary />
+					</binaryDataArray>
+				</binaryDataArrayList>
+			</spectrum>
+			<spectrum id="Spectrum=9" defaultArrayLength="0" index="9">
+				<referenceableParamGroupRef ref="spectrum1" />
+				<scanList count="1">
+					<cvParam cvRef="MS" accession="MS:1000795" name="no combination" value="" />
+					<scan instrumentConfigurationRef="IC1">
+						<referenceableParamGroupRef ref="scan1" />
+						<cvParam cvRef="IMS" accession="IMS:1000050" name="position x" value="3" />
+						<cvParam cvRef="IMS" accession="IMS:1000051" name="position y" value="3" />
+					</scan>
+				</scanList>
+				<binaryDataArrayList count="2">
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="mzArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="16" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="159" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="636" />
+						<binary />
+					</binaryDataArray>
+					<binaryDataArray encodedLength="0">
+						<referenceableParamGroupRef ref="intensityArray" />
+						<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="5740" />
+						<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="159" />
+						<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="636" />
+						<binary />
+					</binaryDataArray>
+				</binaryDataArrayList>
+			</spectrum>
+		</spectrumList>
+	</run>
+</mzML>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/preprocessing_results4.imzml.txt	Fri Feb 15 10:21:09 2019 -0500
@@ -0,0 +1,4 @@
+imzML file:
+total 28
+-rw-r--r-- 1 meli meli  6376 Feb 12 21:29 ibd
+-rw-r--r-- 1 meli meli 16801 Feb 12 21:29 imzml
Binary file test-data/preprocessing_results4.pdf has changed
--- a/test-data/preprocessing_results4.txt	Thu Oct 25 07:28:42 2018 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,160 +0,0 @@
-mz	x = 1, y = 1	x = 2, y = 1	x = 3, y = 1	x = 1, y = 2	x = 2, y = 2	x = 3, y = 2	x = 1, y = 3	x = 2, y = 3	x = 3, y = 3
-1199	1.90173968313755	1.13259535967648	2.08382650993109	2.34349737625869	1.33087314662273	2.14468085106383	3.43161925601751	1.32706902782797	2.22480967308554
-1200	1.39388874502695	0.970046951574763	1.52152411836238	1.35619061126081	1.10906095551895	1.66382978723404	2.22846006564551	1.19804842790025	1.7089117778773
-1201	1.13095882671438	0.99102093971692	1.23623834616944	1.19344773790952	1.05864909390445	1.31063829787234	1.67396061269147	1.07824358511023	1.28168383340797
-1202	1.09263589067539	0.976548887898831	1.13518929874341	1.0033640618352	0.953389126853377	1.08663829787234	1.32242888402626	0.9820310805927	1.04469323779669
-1203	1.10574636879399	0.91761198121937	1.07498986623429	0.954758190327613	0.902372322899506	1.05106382978723	1.17525984682713	1.05059631369715	1.11240483654277
-1204	1.06972857176487	0.959559957503684	1.0088366436968	1.01262232307474	0.972948929159802	1.02127659574468	1.20315919037199	0.972262378026744	1.04388714733542
-1205	0.994091198003719	0.970046951574763	1.02537494933117	0.954758190327613	0.983031301482702	1.08936170212766	1.08807439824945	0.976870256595591	0.931034482758621
-1206	0.886037806916359	0.970046951574763	0.955087150385083	0.972840731811091	0.947742998352554	0.94468085106383	1.05320021881838	1.00912540657752	0.959247648902821
-1207	1.05171967325031	0.933342472325988	1.01297122010539	0.93305914054744	0.917495881383855	0.982978723404255	1.00786378555799	0.972262378026744	0.983430362740708
-1208	1.00489653711246	0.959559957503684	1.04604783137414	0.994539781591264	1.00823723228995	1.01276595744681	1.05668763676149	0.999909649439827	0.991491267353336
-1209	1.34346382918619	1.15356934781864	1.26518038102959	1.31640901999716	1.0737726523888	1.20425531914894	1.19269693654267	1.23951933501988	1.12449619346171
-1210	1.2413173568116	1.11749408821413	1.25029590595865	1.25333711530279	1.12277298187809	1.0743829787234	1.08472647702407	1.13685580050596	1.07564711150918
-1211	1.12375526730855	0.98577744268138	1.09152817186867	1.05240391433839	0.967907742998353	1.07659574468085	0.997401531728665	1.07824358511023	1.07613076578594
-1212	1.05892323265614	1.04869940710785	0.979894608836644	1.00900581477805	0.993113673805601	1	0.979964442013129	1.04138055655945	1.06806986117331
-1213	0.990489418300808	0.996264436752459	1.0088366436968	1.03432137285491	1.01831960461285	0.987234042553191	0.986939277899344	1.02294904228406	1.08419167039857
-1214	1.07333035146778	0.875664004935056	1.06258613700851	1.05240391433839	0.967907742998353	1.02127659574468	1.0601750547046	1.02294904228406	1.08822212270488
-1215	1.15256950493185	0.964803454539223	1.11633563032023	1.07048645582187	1.0939373970346	1.17021276595745	1.13689824945295	1.08745934224792	1.205105239588
-1216	1.05532145295322	0.98577744268138	1.12873935954601	1.02708835626152	1.0031960461285	1.08936170212766	1.13341083150985	1.04138055655945	1.08419167039857
-1217	0.950869841568775	0.975290448610302	0.959221726793677	0.961991206921004	1.02840197693575	0.970212765957447	0.955552516411379	0.972262378026744	1.01970443349754
-1218	0.943666282162951	0.970046951574763	0.959221726793677	0.9656077152177	0.932619439868204	0.906382978723404	0.927653172866521	1.05981207083484	1.00761307657859
-1219	0.860825348995975	0.933342472325988	0.984029185245237	0.969224223514395	0.927578253706755	0.957446808510638	0.892778993435449	0.944615106613661	0.96730855351545
-1220	0.929259163351303	0.938585969361527	1.00056749087961	0.889661040987094	0.962866556836903	1.00425531914894	1.07761214442013	0.986086013733285	1.08016121809225
-1221	0.997692977706632	0.975290448610302	0.971625456019457	0.940292157140831	0.942701812191104	1.0936170212766	1.27290754923414	1.08745934224792	1.12449619346171
-1222	0.983285858894983	0.975290448610302	0.946817997567896	0.918593107360658	0.942701812191104	1.05106382978723	1.13689824945295	1.0459884351283	1.02373488580385
-1223	1.01570187622119	1.05918640117893	1.0708552898257	1.04155438944831	1.05864909390445	1.19574468085106	1.04273796498906	1.16118539934948	1.08419167039857
-1224	1.01210009651828	1.08540388635663	1.14527766518038	1.17174868812934	1.053607907743	1.16170212765957	0.976477024070022	1.115106613661	1.00358262427228
-1225	1.00129475740954	1.02772541896569	1.02124037292258	1.11388455538222	1.07881383855025	1.12765957446809	1.04622538293217	1.05981207083484	1.04791759964174
-1226	0.995970387413935	0.952036679148345	0.996612678662695	1.03400689387259	0.978428479335291	1.12784458834413	1.04076681571687	1.05780864537012	1.06824509823011
-1227	0.900444925728007	0.954316460468145	0.909606809890555	0.951141682030918	0.993113673805601	1.03404255319149	1.04971280087527	0.916967835200578	0.955217196596507
-1228	0.904046705430919	0.98577744268138	0.942683421159303	0.998156289887959	0.993113673805601	0.94468085106383	0.969502188183807	0.958438742320202	0.870577698163905
-1229	0.929259163351303	0.959559957503684	0.884799351438995	0.929442632250745	0.942701812191104	0.970212765957447	0.9660147702407	0.944615106613661	0.90282131661442
-1230	0.914852044539655	0.943829466397066	0.946817997567896	0.951141682030918	0.962866556836903	0.995744680851064	0.955552516411379	0.990693892302132	0.999552171965965
-1231	1.00489653711246	1.03821241303677	1.04191325496555	1.00538930648135	0.922537067545305	1.02978723404255	0.993914113785558	0.953830863751355	1.01567398119122
-1232	0.997692977706632	0.970046951574763	0.955087150385083	1.04155438944831	1.02840197693575	1.01276595744681	1.01135120350109	0.921575713769425	1.01567398119122
-1233	0.922055603945479	0.980533945645841	0.988163761653831	0.947525173734222	0.998154859967051	0.987234042553191	0.948577680525164	0.995301770870979	0.914912673533363
-1234	0.958386599209635	0.973922579818422	0.927583229058353	0.924568208024764	0.920564429482129	0.874745605920444	0.884287888878318	0.894329127449286	0.916840281158122
-1235	0.950869841568775	1.03296891600123	0.967490879610863	0.922209615657354	0.962866556836903	0.893617021276596	0.889291575492341	0.999909649439827	0.975369458128079
-1236	0.878834247510535	0.943829466397066	0.897203080664775	0.904127074173876	1.00823723228995	0.868085106382979	0.889291575492341	0.990693892302132	0.935064935064935
-1237	0.947268061865863	1.05394290414339	0.984029185245237	0.900510565877181	0.993113673805601	0.970212765957447	1.02878829321663	0.916967835200578	1.05194805194805
-1238	0.918453824242567	1.01723842489462	0.95095257397649	0.911360090767267	1.0132784184514	1.02127659574468	0.955552516411379	0.944615106613661	0.947156291983878
-1239	0.961675180677511	1.01723842489462	0.922010539116336	0.940292157140831	0.947742998352554	0.948936170212766	0.892778993435449	0.944615106613661	0.898790864308106
-1240	0.973420114491355	1.03958028182865	1.04838476586595	0.905699469085483	1.00473032017764	0.879185938945421	0.906122157739511	0.980877107525023	0.925251659884344
-1241	1.0769321311707	1.08540388635663	1.09566274827726	1.0487874060417	1.02840197693575	1.02978723404255	0.892778993435449	1.09206722081677	1.01567398119122
-1242	1.05171967325031	1.02248192193016	1.12873935954601	0.958374698624309	0.998154859967051	1.08085106382979	0.934628008752735	1.07363570654138	0.999552171965965
-1243	0.986887638597895	0.996264436752459	0.946817997567896	0.972840731811091	1.01831960461285	1.06808510638298	1.00437636761488	0.981478135164438	0.910882221227049
-1244	1.03355417561823	1.03958028182865	1.04407042526568	1.15099307529613	1.0625943700308	1.04791859389454	0.964346874702692	1.00972643421694	1.01357113650967
-1245	1.01570187622119	1.10113437746324	1.05431698419133	1.09941852219543	1.09897858319605	1.15744680851064	1.02181345733042	0.972262378026744	1.01567398119122
-1246	1.11655170790273	1.02772541896569	1.02537494933117	1.03432137285491	1.053607907743	1.02127659574468	1.02530087527352	1.04138055655945	0.995521719659651
-1247	0.979684079192071	1.02248192193016	1.05018240778273	0.943908665437527	0.957825370675453	0.974468085106383	0.997401531728665	1.0459884351283	0.906851768920734
-1248	0.928319568646195	0.995808480488499	0.893068504256182	0.947210694751901	1.00999068834611	0.874745605920444	0.887926933688517	1.01453465533225	0.946280106699897
-1249	0.900444925728007	1.06967339525001	0.992298338062424	0.878811516097007	0.988072487644152	0.902127659574468	0.927653172866521	0.926183592338273	0.947156291983878
-1250	0.961675180677511	1.001507933788	0.96335630320227	0.940292157140831	0.952784184514003	0.919148936170213	0.94160284463895	0.949222985182508	0.898790864308106
-1251	0.939594705107485	0.941093728813307	0.914640207257539	0.905699469085483	0.98894921567223	0.843663274745606	0.964346874702692	0.976068886409704	0.895811834342569
-1252	1.00849831681537	0.996264436752459	0.979894608836644	0.904127074173876	1.0233607907743	0.919148936170213	0.927653172866521	0.981478135164438	0.951186744290193
-1253	0.961675180677511	0.98577744268138	0.984029185245237	0.918593107360658	0.962866556836903	0.91063829787234	0.896266411378556	0.926183592338273	0.96730855351545
-1254	0.947111462748345	0.91920782814323	0.893068504256182	0.883056982358346	0.946866270324475	0.86586493987049	0.869731709637523	1.0001099919863	0.916840281158122
-1255	0.896843146025095	0.964803454539223	0.979894608836644	0.896894057580485	0.972948929159802	0.91063829787234	0.857904814004376	0.935399349475967	0.918943125839678
-1256	0.922055603945479	1.001507933788	0.884799351438995	0.89327754928379	0.897331136738056	0.987234042553191	0.857904814004376	0.972262378026744	0.90282131661442
-1257	0.909527674544046	0.984865530153461	0.923268888458081	0.890604477934058	0.999469952009168	0.874745605920444	0.84789744077633	0.831822252950142	0.979925621604782
-1258	1.10214458909108	1.00675143082354	1.0047020672882	0.904127074173876	1.0132784184514	0.957446808510638	0.993914113785558	0.953830863751355	0.959247648902821
-1259	0.980936872132215	0.995808480488499	0.94915493205971	0.988721920418319	1.01525105651458	0.959111933395005	0.949790695461897	1.01934287644757	0.954691485426118
-1260	1.00129475740954	1.03821241303677	1.01297122010539	1.07771947241526	1.03848434925865	0.974468085106383	0.945090262582057	1.00451752800867	1.01164352888491
-1261	1.13095882671438	1.10637787449878	1.1328739359546	1.30917600340377	1.08889621087315	1.05106382978723	1.0148386214442	1.09667509938562	1.01567398119122
-1262	1.13127202494941	1.138066834844	1.08289949066812	1.21137303990183	1.04681326552539	1.07012025901943	0.993459233184283	1.04819220313949	1.03459958332522
-1263	1.19939264106971	1.1221083656054	1.02124037292258	1.13920011345908	1.1141021416804	1.14042553191489	0.9660147702407	1.03216479942176	1.01567398119122
-1264	1.46952611878811	1.21466748718927	1.35470294848522	1.50195161956676	1.23618651959029	1.30101757631822	1.02621063647607	1.22609638440628	1.15235888549232
-1265	1.37227806680948	1.16405634188972	1.26931495743818	1.51893348461211	1.13930807248764	1.20851063829787	1.12294857768053	1.24412721358872	1.1486789072996
-1266	1.15006391905156	1.138066834844	1.09584251246894	1.18118305759898	1.17832246973712	1.0745605920444	1.03712777090667	1.06742508760076	1.01357113650967
-1267	1.18138374255514	1.07491689228555	1.36441021483583	1.20068075450291	1.11914332784185	1.07659574468085	1.10202407002188	1.16118539934948	1.03179579041648
-1268	1.49959314935155	1.22013896235679	1.63082074690259	1.47930913283962	1.24144688775876	1.42978723404255	1.14993816002283	1.24052104775224	1.24067836211764
-1269	1.37587984651239	1.11162137153432	1.34787190920146	1.32725854488725	1.17963756177924	1.32340425531915	1.13689824945295	1.24873509215757	1.16077026421854
-1270	1.05234606972038	1.0231658563261	1.19507234627518	1.12457684078114	1.02051142468305	1.04347826086957	0.946151650651698	1.0770415298314	1.00095406842034
-1271	1.05892323265614	1.02772541896569	1.05431698419133	1.04155438944831	1.03848434925865	0.961702127659574	1.0148386214442	0.981478135164438	0.931034482758621
-1272	0.995970387413935	0.995808480488499	0.901697185456724	0.954758190327613	1.01525105651458	0.901387604070305	0.935234516221102	1.01453465533225	0.942074417336786
-1273	0.954471621271687	0.964803454539223	0.934414268342116	0.987306764997873	0.983031301482702	0.995744680851064	0.983451859956236	1.01834116371522	0.96730855351545
-1274	0.823084961674157	0.957508154315864	0.931897569658624	0.966079433691182	1.02577179285151	0.905827937095282	0.855175530396727	0.899137348564605	0.979925621604782
-1275	0.828409331669766	0.938585969361527	0.930279691933522	0.918593107360658	0.937660626029654	0.872340425531915	0.90324124726477	0.940007228044814	0.96730855351545
-1276	0.871943886339746	0.946565203980826	0.854239438853739	0.932115703600476	0.983688847503761	0.883626271970398	0.884287888878318	0.884712685218648	0.929457349247454
-1277	0.893241366322183	0.99102093971692	0.922010539116336	0.954758190327613	0.962866556836903	0.931914893617021	0.948577680525164	0.949222985182508	0.939095387371249
-1278	0.920802811005336	0.962979629483384	0.91895454785781	0.913246964661195	0.894262588639782	0.919148936170213	0.862453620017125	0.942411338602473	0.958897174789229
-1279	0.907648485133831	0.975290448610302	0.938548844750709	0.875195007800312	0.972948929159802	0.970212765957447	0.945090262582057	0.935399349475967	1.01164352888491
-1280	0.995970387413935	0.979394054985941	0.987983997462153	0.913246964661195	0.999469952009168	0.950231267345051	0.964346874702692	1.02895931867821	1.04721665141455
-1281	1.07865472146339	0.968451104650903	0.987983997462153	1.01136440714546	1.0625943700308	0.981313598519889	1.05532299495766	0.995301770870979	1.08506785568255
-1282	1.10574636879399	1.10637787449878	1.20316173490069	1.23322932917317	0.932619439868204	1.08510638297872	1.04971280087527	1.09667509938562	1.18092252575011
-1283	1.10120499438597	1.10523798383888	1.0570134470665	1.06419687617544	1.02577179285151	1.04347826086957	0.97162496432309	1.08665797206204	0.988337000331003
-1284	0.995970387413935	0.973922579818422	0.936211910258896	1.06419687617544	1.02051142468305	0.976873265494912	0.964346874702692	0.976068886409704	1.05983371950388
-1285	0.950869841568775	1.03821241303677	0.934414268342116	0.983690256701177	0.927578253706755	0.953191489361702	0.948577680525164	0.963046620889049	0.999552171965965
-1286	1.00724552387522	0.957508154315864	0.914640207257539	0.984948172630463	0.941605902156006	0.972432932469935	0.957068785082295	0.947219559717792	0.929457349247454
-1287	0.896843146025095	1.00675143082354	1.00056749087961	0.958374698624309	0.988072487644152	1.05106382978723	0.885804157549234	0.995301770870979	1.0922525750112
-1288	0.928319568646196	0.946565203980826	1.05269910646622	1.03400689387259	0.957387006661414	0.99463459759482	0.957068785082295	0.980877107525023	0.891606144979458
-1289	1.21019798017844	1.06693765766625	1.14761459967219	1.21892053547755	1.12571878805243	1.08344125809436	0.978903053943488	1.0530004242548	1.11871337058743
-1290	1.228206878693	1.16929983892525	1.17421970004053	1.23322932917317	1.12418451400329	1.16170212765957	1.12294857768053	1.1243223707987	1.0922525750112
-1291	1.10120499438597	1.00675143082354	1.03544174406514	1.06042312838759	1.03629252918845	1.07012025901943	1.04440586052707	1.0770415298314	0.933663038610565
-1292	0.954628220389205	0.952036679148345	0.970726635061067	0.950984442539757	0.957387006661414	0.985753931544866	0.887926933688517	0.971260665294386	0.954691485426118
-1293	0.913286053364476	0.973922579818422	0.983669656861881	0.958531938115469	1.02577179285151	0.990194264569843	0.949790695461897	0.851055137411417	0.954691485426118
-1294	0.896843146025095	0.996264436752459	0.913741386299149	0.911360090767267	0.967907742998353	0.961702127659574	0.913703501094092	0.907752078062884	0.939095387371249
-1295	0.905769295723616	0.968451104650903	0.871496801254825	0.894378225721914	0.931085165819067	0.888066604995375	0.9388735610313	0.923178454141198	0.929457349247454
-1296	0.924561189825766	1.01769438115858	0.94915493205971	0.890604477934058	1.00473032017764	1.00351526364477	0.967985919512891	0.976068886409704	1.00095406842034
-1297	1.17057840344641	0.98577744268138	1.15354681799757	1.10665153878882	1.00823723228995	1.20851063829787	1.44379102844639	1.06902782797253	1.21316614420063
-1298	1.08617147910425	0.99033700532098	1.11741421547029	1.00004316378189	0.962647374829883	1.08788159111933	1.20088478736562	1.00491821310162	1.13974181740299
-1299	1.03355417561823	1.00675143082354	1.08289949066812	1.04155438944831	1.00999068834611	0.981313598519889	1.15721624964323	1.0530004242548	1.09347923440877
-1300	1.17261419197414	0.946565203980826	1.09152817186867	1.04910188502402	1.05733400186233	1.10564292321924	1.2591095043288	1.16839773102245	1.1060963024981
-1301	1.0297957967978	1.00127995565602	1.08289949066812	1.06419687617544	1.0625943700308	1.07012025901943	1.13174293597184	1.04819220313949	1.04301096205144
-1302	1.00129475740954	1.01199492785908	1.06672071341711	0.943908665437527	1.04856672158155	1.05106382978723	0.976477024070022	0.981478135164438	1.01970443349754
-1303	0.917044432184906	0.91920782814323	0.875811141855096	0.913246964661195	1.0625943700308	0.950231267345051	0.957068785082295	0.976068886409704	0.971514242878561
-1304	0.924561189825766	1.01769438115858	0.957783613260253	0.973626929266894	0.973168111166822	0.892506938020352	0.949790695461897	0.971260665294386	0.971514242878561
-1305	0.969661735670925	0.973922579818422	0.931897569658624	0.924568208024764	0.925824797650598	0.870305272895467	0.833341261535534	0.860671579642055	1.00095406842034
-1306	0.883219022801036	0.941093728813307	0.88875416365591	0.939663199176188	1.06785473819927	0.910268270120259	0.829702216725335	0.927986675256517	0.916840281158122
-1307	0.918453824242567	0.98577744268138	0.888933927847588	0.918593107360658	0.952784184514003	0.974468085106383	0.962527352297593	0.958438742320202	0.971339005821764
-1308	0.879460643980606	0.913736352975711	0.88875416365591	0.867961991206921	0.941605902156006	0.856984273820537	0.844258395966131	0.923178454141198	0.90422321306879
-1309	0.924561189825766	1.01222290599106	0.957783613260253	0.826450765540503	0.920564429482129	0.928029602220167	0.869731709637523	0.995301770870979	0.90001752370568
-1310	0.898252538082756	1.00675143082354	0.983669656861881	0.913246964661195	0.920564429482129	0.901387604070305	0.90976120254971	1.0001099919863	0.908428902431901
-1311	0.999728766234364	0.952036679148345	0.936211910258896	0.939663199176188	1.04681326552539	0.954671600370028	0.895205023308914	1.0530004242548	0.996748379057225
-1312	0.898252538082756	0.968451104650903	1.01387004106378	0.950984442539757	0.967907742998353	0.901387604070305	0.9388735610313	1.02895931867821	0.916840281158122
-1313	0.958386599209635	0.935622253645788	0.936211910258896	0.901925721297627	0.952126638492945	0.919148936170213	0.964346874702692	0.990493549755661	0.925251659884344
-1314	0.986887638597895	1.04869940710785	0.905472233481962	0.990923273294568	0.957825370675453	0.961702127659575	0.94160284463895	0.972262378026744	0.890729959695477
-1315	0.894494159262326	0.952036679148345	0.897382844856453	1.00381691156974	0.952126638492945	0.919148936170213	0.917039292170107	0.942411338602473	0.96730855351545
-1316	0.920802811005336	0.968451104650903	0.910325866657267	0.969853181479038	1.02577179285151	0.92358926919519	0.997098277994482	0.894329127449286	0.963102864152339
-1317	0.894494159262326	0.979394054985941	0.871496801254825	0.92834195581262	0.91004369314519	0.928029602220167	0.887926933688517	0.923178454141198	0.984131310967893
-1318	0.984695250952645	0.913736352975711	0.901697185456724	0.845319504479784	0.98894921567223	0.928029602220167	0.891565978498716	0.908753790795242	0.874783387527016
-1319	0.913286053364476	1.00675143082354	0.897382844856453	0.815129522176934	0.941605902156006	1.00351526364477	1.04076681571687	0.894329127449286	0.979925621604782
-1320	0.853151992237597	0.941093728813307	0.845610757653196	0.886830730146202	0.967907742998353	0.92358926919519	0.975264009133289	0.942411338602473	0.942074417336786
-1321	0.905769295723616	0.91920782814323	0.802467351650482	0.867961991206921	0.98894921567223	0.92358926919519	0.927956426600704	0.952027780833111	0.942074417336786
-1322	0.909527674544046	0.930150778478268	0.94915493205971	0.943436946964045	1.01525105651458	0.892506938020352	0.997098277994482	0.91837023302588	0.975719932241671
-1323	0.909527674544046	0.941093728813307	0.91895454785781	0.917020712449051	0.936345533987537	0.919148936170213	0.989820188374084	0.961644223063748	0.916840281158122
-1324	0.883219022801036	0.930150778478268	0.987983997462153	0.935889451388332	1.00999068834611	0.901387604070305	0.978903053943488	0.980877107525023	1.01357113650967
-1325	0.879460643980606	1.05599470733121	0.906011526056996	0.981174424842606	0.962647374829883	0.919148936170213	0.942512605841499	0.990493549755661	0.937868727973675
-1326	0.992212008593505	0.968451104650903	0.94915493205971	0.913246964661195	0.983688847503761	0.950231267345051	0.855175530396727	0.980877107525023	0.933663038610565
-1327	0.920802811005336	0.957508154315864	0.897382844856453	0.969853181479038	0.962647374829883	0.985753931544866	1.01893254685567	0.942411338602473	0.950485796063007
-1328	0.947111462748345	0.957508154315864	0.966412294460796	0.935889451388332	0.931085165819067	0.896947271045328	0.960707829892494	0.913562011910561	0.921045970521233
-1329	0.958386599209635	0.913736352975711	0.854239438853739	0.883056982358346	0.983688847503761	0.950231267345051	1.01529350204548	0.903945569679923	0.979925621604782
-1330	0.939594705107485	1.01222290599106	0.841296417052925	0.886830730146202	0.941605902156006	0.905827937095282	0.884287888878318	0.851055137411417	0.908428902431901
-1331	0.943353083927915	0.946565203980826	0.940526250859167	0.905699469085483	0.957387006661414	0.950231267345051	0.880648844068119	0.884712685218648	1.01357113650967
-1332	1.03731255443866	1.05599470733121	0.940526250859167	0.920794460236907	1.01525105651458	0.919148936170213	1.03348872609647	1.00491821310162	1.02198251523589
-1333	1.07113796382253	1.17089568584911	1.04407042526568	1.14721932750828	1.0625943700308	1.06123959296947	1.05168395014746	1.06261686648544	1.026188204599
-1334	1.0297957967978	1.08335208316881	0.923268888458081	1.08683936290258	0.98894921567223	0.981313598519889	1.03712777090667	1.0001099919863	0.950485796063007
-1335	0.988453629773075	0.957508154315864	0.931897569658624	0.913246964661195	0.941605902156006	0.945790934320074	0.887926933688517	0.995301770870979	0.946280106699897
-1336	0.871943886339746	0.935622253645788	0.811096032851025	0.886830730146202	0.925824797650598	0.941350601295097	0.902483112929312	0.971260665294386	0.963102864152339
-1337	0.860668749878457	0.979394054985941	0.836982076452653	0.943436946964045	0.978428479335291	0.914708603145236	0.851536485586528	0.937603117487155	0.90001752370568
-1338	0.884073199805679	1.08111375241846	0.81188045841471	0.883743118319774	0.940410363935899	0.923791102514507	0.88643823353889	0.929953674803693	1.00248341000692
-1339	0.856910371058027	0.946565203980826	0.862868120054282	0.924568208024764	0.952126638492945	0.945790934320074	0.884287888878318	0.952027780833111	0.971514242878561
-1340	0.920802811005336	0.935622253645788	0.793838670449939	0.909473216873339	0.994209583840699	0.959111933395005	0.906122157739511	0.865479800757373	0.992542689694114
-1341	0.856910371058027	0.968451104650903	0.94915493205971	0.901925721297627	0.946866270324475	0.892506938020352	0.924317381790505	0.91837023302588	0.958897174789229
-1342	0.958386599209635	0.913736352975711	0.923268888458081	0.966079433691182	0.994209583840699	0.892506938020352	0.9388735610313	0.961644223063748	0.971514242878561
-1343	0.856910371058027	0.962979629483384	0.893068504256182	0.939663199176188	0.973168111166822	0.932469935245143	0.866092664827324	0.923178454141198	0.984131310967893
-1344	0.950869841568775	0.99033700532098	0.91895454785781	0.958531938115469	0.983688847503761	0.892506938020352	0.942512605841499	0.889520906333967	0.96730855351545
-1345	0.884073199805679	0.966710180733965	0.888558057264989	0.919250654323694	1.0009045978733	0.974854932301741	0.939700616669982	0.919900121562572	0.940927411146847
-1346	0.879460643980606	0.946565203980826	0.94915493205971	0.920794460236907	1.00999068834611	0.905827937095282	0.913400247359909	0.985685328640342	0.929457349247454
-1347	0.920802811005336	0.935622253645788	0.88875416365591	0.943436946964045	0.925824797650598	0.910268270120259	0.924317381790505	0.971260665294386	0.874783387527016
-1348	1.10120499438597	1.00675143082354	1.07858515006785	1.10948184962972	1.06785473819927	1.16336725254394	1.20452383217582	1.06742508760076	1.11030199186121
-1349	1.10120499438597	0.984865530153461	1.10015685306921	1.10570810184186	1.08889621087315	1.06567992599445	1.17177242888403	1.13954840433054	1.13974181740299
-1350	1.05610444854081	1.01769438115858	0.996612678662695	0.973626929266894	0.946866270324475	0.967992599444958	1.05532299495766	1.0770415298314	1.00936544714656
-1351	0.935152984683341	1.00103125223931	0.996808785053617	0.907414808989054	0.989905646248315	0.960928433268859	0.989158543863139	1.02546243059434	0.905752554655376
-1352	0.898252538082756	0.962979629483384	0.975040975661338	0.947210694751901	0.994209583840699	0.910268270120259	0.862453620017125	0.956836001948429	0.870577698163905
-1353	0.890735780441896	0.957508154315864	0.923268888458081	0.962305685903325	0.931085165819067	0.874745605920444	0.913400247359909	0.947219559717792	0.887400455616348
-1354	1.06362120618167	1.11618093417392	1.04838476586595	1.07551811953901	1.02051142468305	1.08344125809436	1.09535248786985	1.11069907763863	1.07245078759322
-1355	1.17876426640757	1.01819178799199	1.08701772487747	1.1007336161215	1.0558993559982	1.09555125725338	1.09948776606326	1.05059631369714	1.03765826649839
-1356	1.25341933661339	1.11461765555463	1.12696739822804	1.128350588569	1.02840197693575	1.09422492401216	1.08807439824945	1.10589085652331	0.953489859893801
-1357	NaN	NaN	NaN	NaN	NaN	NaN	NaN	NaN	NaN
Binary file test-data/preprocessing_results5.RData has changed
Binary file test-data/preprocessing_results5.pdf has changed
--- a/test-data/preprocessing_results5.txt	Thu Oct 25 07:28:42 2018 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,100 +0,0 @@
-	x = 1, y = 1	x = 2, y = 1	x = 3, y = 1	x = 1, y = 2	x = 2, y = 2	x = 3, y = 2	x = 1, y = 3	x = 2, y = 3	x = 3, y = 3
-301	0	0	0	0	0	0	0	0	0
-302	0	4.32197925754431e-23	0	0	0	0	0	0	0
-303	0	1.28620729883923e-30	0	0.00308917369693518	0	0	0	0	0
-304	0	1.32924944261294e-38	0	2.8316210487489e-10	0.411686420440674	0	0	0	0.609295308589935
-305	0	0	0	5.69736818276873e-18	0	0	0.716848015785217	0	0
-306	0	0.180751591920853	0.0924000516533852	3.22355374818131e-26	0.228940084576607	0	0	0	0.338278532028198
-307	5.31794802036641e-23	1.36712752230039e-09	0	0.503042221069336	0.171210870146751	0	0	0.0994685217738152	0.00513129541650414
-308	1.42257959582276e-30	0	0	0	0	0	0	0.0315862037241459	0.322940319776535
-309	1.43981749664202e-38	2.37613022591177e-07	0	0	1.4921518187716e-10	0	7.17280070103395e-32	1.14764100445086e-08	0
-310	0	2.2688041766486e-14	0.0299898684024811	0	4.55189177922775e-18	0	0	2.89623705606364e-14	0
-311	0	4.60080996999485e-22	9.34697319543432e-10	3.53486932303922e-32	5.44664266518465e-26	0	0	6.9618325415624e-22	0
-312	0	0	1.14256191537071e-17	0	0	0	0	6.04272858040201e-30	1.25046502952903e-32
-313	0	0	0	0	0	0	0	0.000948468048591167	0
-314	0	0.343302994966507	0	0	0	0	0	0	0
-315	0	0	0.12950636446476	0	0	0	0	0	0
-316	0.327463179826736	0	1.93941795956221e-09	0.00699668889865279	0	0	0	0.0240590367466211	0
-317	1.18278642435854e-09	0	0	1.591814253743e-07	0	0	0	7.10978553808417e-10	0
-318	0	2.88274619950529e-32	0.312686443328857	1.89643697338752e-14	0	0	0	8.22819137337219e-18	0
-319	0	0	3.68662113032769e-05	3.99332497384422e-22	0	0	0	0	0
-320	0	0	5.68011697044319e-15	2.58921175367487e-30	0	0	0	0	0
-321	0	0	0	0	0	0	0.0821415111422539	0	0
-322	0	0	0	0	0	0	1.23654897432601e-09	8.91581066753133e-07	0
-323	0	0	0	0	0	0	0	3.62019611608189e-14	0
-324	0	0	0	0	0	0	1.41676795295531e-10	5.43261166662179e-22	0
-325	0	0	0	0	0	0	3.87320208074687e-18	0	0
-326	0	0	0	0	0	0	4.08673089735238e-26	0	0.0913732051849365
-327	0.0852032229304314	0	0	0.539452373981476	0	0	0.313083916902542	0	0.335682272911072
-328	0.12766021490097	0	0.454382658004761	0.058334868401289	0	0	2.71850386646122e-09	0.849055886268616	0.565727531909943
-329	2.21637320518494	1.62591469287872	0.87499076128006	2.59215974807739	0.914434671401978	0.544950544834137	0.609484612941742	1.3272477388382	1.07743680477142
-330	0	0.282970458269119	0	0.414683222770691	0	0.386884957551956	0	0.0383349843323231	0
-331	0	0	0	0	1.48969615668734e-14	0	1.53340424261178e-14	0	0
-332	9.75976108698449e-24	0	1.9129100416656e-25	0	3.87271811263777e-22	0	4.34332980949855e-22	4.19115925707927e-15	2.22326423345091e-22
-333	2.46229240610247e-30	0.292759567499161	8.11414880231369e-31	0	3.81384647033894e-30	0	4.78893314027823e-30	3.07998888597304e-22	5.63234713964859e-30
-334	5.59128344770361e-38	2.16568318833765e-09	1.95524197675121e-38	3.50986532392816e-31	0	0.0106925405561924	0	5.88708673366388e-30	5.33374608969737e-38
-335	0	0	0	0	0	0	0.188220098614693	2.75847732676006e-38	0
-336	0	0	7.14956786396215e-06	0	0	0	2.40733255552072e-09	0	0
-337	0	0	9.22569177086094e-14	0	0	1.92654253432319e-23	0.129606500267982	0	0
-338	0	0	0	0	0	8.21688042580719e-31	0	0	0
-339	0	0	0	0	0	1.2691101966792e-38	0	0	0
-340	0	0	0	0	0.131738051772118	0	0	0	0
-341	0	0	0	0	1.97074911945094e-09	0	2.68033400688056e-31	0	0
-342	0	0	0	0	0	0	0	0	0
-343	0	0.540803730487823	0	0.311067968606949	0	0	0.456998586654663	0	1.1592504051805e-05
-344	0	0.760098695755005	0	1.23029351234436	0.179359897971153	0	0	0	0.385462760925293
-345	1.29758274555206	1.30673027038574	0.626297771930695	0.370624721050262	0.266427725553513	0.95829576253891	0.664171636104584	0.340830773115158	0.920338690280914
-346	0	1.22390151023865	0	0.25139981508255	0	0.280698895454407	0	0	0.700047612190247
-347	0	0.0356887876987457	0	0.208728492259979	0	0	0	0.0668430551886559	0
-348	0	9.81050796156069e-10	5.19627293105376e-24	2.63146238133061e-09	0	0	9.31592096266419e-23	1.41976275180866e-09	0
-349	0	1.04223425420895e-17	6.50702138942878e-31	0	3.61575250654619e-19	0	2.28809034992078e-30	9.42402156952173e-18	0
-350	0	0.0264999140053988	1.43329403190105e-38	0	1.18586093356332e-26	7.10052307988494e-32	2.00786591889092e-38	0	4.14061161573622e-23
-351	0	0	0	0	1.5203838193817e-34	0	0	0	1.16283201971478e-30
-352	0	0	0	0	0	0	0	0	1.26231628133462e-38
-353	0	1.38150654422023e-23	0	0	0	0	0.205960765480995	0	0
-354	0	7.25574687381216e-31	0	0	0	0	0	0	0
-355	0	1.23978031917165e-38	0	0	0	0	0.00283639249391854	0	0
-356	0	0	0	0.121438764035702	0	0	0	0	1.23199033623678e-05
-357	0	0	0	1.77123560263226e-09	0	0	0.182004451751709	0	1.95739488528281e-13
-358	0	0	0	0	0	0	1.98827221353781e-09	1.78993400368199e-06	1.41009214974392e-22
-359	0	0	0	0	0	0	0	6.27455241084852e-14	0
-360	0	0	0.108914941549301	0	0.137880623340607	0	0	8.50402759093013e-22	0
-361	0.195893675088882	0	1.41621303573203e-09	0	1.26956511969922e-09	0	0	0	0
-362	2.35806374426772e-09	0	0	0	0	0	0	0	0
-363	0	0	0	0	0	0	0	0	0
-364	0	0	0	0	0	0	0	0	0
-365	4.718969194073e-06	0	0	0	0	0	0	0	0
-366	1.5078418385845e-13	0	0	0	0.0833132043480873	0	0.00646991981193423	0	0
-367	1.88767583715038e-21	0	0	0	1.99935068501134e-09	0	0	0	0
-368	0	0.240184053778648	0	0	1.73021765774411e-17	0	0	0	0
-369	0	0	0	2.14222150679164e-28	0	0	1.8149379644405e-23	0	0
-370	0.220073893666267	0	0	5.0712002936768e-35	0	0	8.36182452163646e-31	0	0
-371	0	0	1.01167734101182e-05	0	0	0	1.34585889318073e-38	1.26896829897305e-05	0
-372	0	2.36356311389003e-23	2.1724240245255e-13	0	0	0	0	1.94110095293361e-13	0
-373	0	1.28305368259484e-30	1.48263228973474e-21	0	0	0	0	0	0
-374	2.51170957735397e-31	2.22206616007007e-38	0	0	0	0	0	0	0
-375	0	0	0	4.09362382924883e-06	0	0	0	0	0
-376	0	0.25187474489212	0	0	0	0	0	0	0
-377	0	0	0	0	0	0	0	0	0.0245788525789976
-378	0	0	0	0	0	0	0	0	7.31565030775982e-10
-379	0	0	0	4.74098883507114e-36	0	0	0	0	8.53033646290005e-18
-380	0	5.35888382280358e-11	0	0	0	0	0	0	0
-381	0	2.08035531146295e-18	0	0	0	0	0	0	0
-382	0	3.03360559481662e-26	1.34763172843222e-11	0	0	0	0	0	0
-383	0	0	9.92826425348915e-19	0	0	0	0	0	0
-384	0	0	1.89875384027677e-26	0	0	0	0	0	0
-385	0	0	8.90882200712694e-35	0	0	0	0	0	0
-386	0	0	0	0	5.48654842174003e-23	0	0	0	0
-387	0	0	0	0	1.95871382355483e-30	0	0	0	0.445850938558578
-388	0	0	2.8698808819172e-05	0	2.6922900766543e-38	0	0	2.03287057326529e-11	0
-389	0	0	0	0	0	0	0	1.5199915248611e-18	1.14508647721767e-14
-390	0	0	0	0	0	5.99971986065457e-19	0	2.91871447509579e-26	3.90949821591828e-22
-391	0	0	0	0	0	0.0269051976501942	0	1.39327729380305e-34	5.18557991695755e-30
-392	0	0	9.13119889883398e-37	0	0	0.554931581020355	0	0	0
-393	0	0	0.0149336429312825	0	0	0	0	0	0
-394	0	0	9.79982650584077e-10	0	0	0	0	0	0.133639797568321
-395	0	0	0	0	0	0	0	0	0.0395353808999062
-396	0	0	0	0.35160955786705	0	4.33367092554234e-32	0	0	9.14517350736332e-10
-397	0	0	0	0.0388109683990479	0	0	0	3.20919536266692e-27	7.3794850397387e-18
-398	0	0	2.73956025372824e-23	0	0	0	0	1.02695755303769e-34	0
-399	0	0	0	0	0	0	0	0	0
Binary file test-data/rdata_notfiltered.RData has changed
Binary file test-data/rdata_notfiltered.pdf has changed
--- a/test-data/scores_pca.tabular	Thu Oct 25 07:28:42 2018 -0400
+++ b/test-data/scores_pca.tabular	Fri Feb 15 10:21:09 2019 -0500
@@ -1,10 +1,10 @@
 pixel names	x	y	PC1	PC2
-xy_1_1	1	1	1.00970093989579	0.757987492163095
-xy_2_1	2	1	0.579669229309751	-0.365615195586663
-xy_3_1	3	1	-1.04790449059337	0.831141108678224
-xy_1_2	1	2	3.5004093695087	0.608578545994517
-xy_2_2	2	2	-0.325050824762022	0.275854508943195
-xy_3_2	3	2	-1.31374997886227	0.0192699346592569
-xy_1_3	1	3	-1.46193831394872	-0.0337353199555284
-xy_2_3	2	3	-1.08833133183905	1.16461090511219
-xy_3_3	3	3	0.147195401291175	-3.25809198000829
+xy_1_1	1	1	1.009701	0.757987
+xy_2_1	2	1	0.579669	-0.365615
+xy_3_1	3	1	-1.047904	0.831141
+xy_1_2	1	2	3.500409	0.608579
+xy_2_2	2	2	-0.325051	0.275855
+xy_3_2	3	2	-1.31375	0.01927
+xy_1_3	1	3	-1.461938	-0.033735
+xy_2_3	2	3	-1.088331	1.164611
+xy_3_3	3	3	0.147195	-3.258092
Binary file test-data/test1.pdf has changed
Binary file test-data/test2.pdf has changed
Binary file test-data/test2.rdata has changed
Binary file test-data/test3.pdf has changed
Binary file test-data/test4.pdf has changed
Binary file test-data/test4.rdata has changed
Binary file test-data/test5.pdf has changed
Binary file test-data/test6.pdf has changed
Binary file test-data/test6.rdata has changed
Binary file test-data/test7.pdf has changed
Binary file test-data/test7.rdata has changed