Documentation ¶
Overview ¶
Example (ConvertHousekeepingData) ¶
data := [][]string{ {"13", "14", "34", "3.1415926", "44"}, {"13", "13.33", "999", "55", "N/A"}, } result, err := convertHousekeepingData( []string{"ONE", "TWO", "THREE", "FOUR"}, 2, data, []protos.Experiment_MetaDataType{protos.Experiment_MT_INT, protos.Experiment_MT_FLOAT, protos.Experiment_MT_INT, protos.Experiment_MT_FLOAT, protos.Experiment_MT_STRING}, ) fmt.Printf("%v|%v|%v\n", err, result.Header, len(result.Data)) // Print in increasing PMC order, map ordering is non-deterministic keys := []int{} for k := range result.Data { keys = append(keys, int(k)) } sort.Ints(keys) for _, pmc := range keys { hks := result.Data[int32(pmc)] fmt.Printf("%v: %v\n", pmc, hks) }
Output: <nil>|[ONE TWO THREE FOUR]|2 34: [{ 13 0 MT_INT} { 0 14 MT_FLOAT} { 0 3.1415925 MT_FLOAT} {44 0 0 MT_STRING}] 999: [{ 13 0 MT_INT} { 0 13.33 MT_FLOAT} { 0 55 MT_FLOAT} {N/A 0 0 MT_STRING}]
Example (ParseBeamLocationHeaders) ¶
cols, geom_corr, err := parseBeamLocationHeaders([]string{"PMC", "x", "y", "z", "PMC_777_MCC_i", "PMC_777_MCC_j", "PMC_3027_MCC_i", "PMC_3027_MCC_j"}, true, 444) fmt.Printf("%v|%v|%v\n", cols, geom_corr, err) // With optional geom_corr cols, geom_corr, err = parseBeamLocationHeaders([]string{"PMC", "x", "y", "z", "geom_corr", "PMC_777_MCC_i", "PMC_777_MCC_j", "PMC_3027_MCC_i", "PMC_3027_MCC_j"}, true, 444) fmt.Printf("%v|%v|%v\n", cols, geom_corr, err) // With optional geom_corr mixed amongst ijs (SHOULD FAIL) cols, geom_corr, err = parseBeamLocationHeaders([]string{"PMC", "x", "y", "z", "PMC_777_MCC_i", "PMC_777_MCC_j", "geom_corr", "PMC_3027_MCC_i", "PMC_3027_MCC_j"}, true, 444) fmt.Printf("%v|%v|%v\n", cols, geom_corr, err) // With optional geom_corr and another mixed amongst ijs (SHOULD FAIL) cols, geom_corr, err = parseBeamLocationHeaders([]string{"PMC", "x", "y", "z", "PMC_777_MCC_i", "PMC_777_MCC_j", "geom_corr", "PMC_3027_MCC_i", "SCLK", "PMC_3027_MCC_j"}, true, 444) fmt.Printf("%v|%v|%v\n", cols, geom_corr, err) cols, geom_corr, err = parseBeamLocationHeaders([]string{"PMC", "x", "y", "z", "PMC_777_MCC_i", "PMC_777_MCC_j", "PMC_3027_MCC_i", "PMC_3027_MCC_j"}, false, 444) fmt.Printf("%v|%v|%v\n", cols, geom_corr, err) cols, geom_corr, err = parseBeamLocationHeaders([]string{"PMC", "x", "y", "z", "image_i", "image_j"}, false, 444) fmt.Printf("%v|%v|%v\n", cols, geom_corr, err) cols, geom_corr, err = parseBeamLocationHeaders([]string{"PMC", "x", "y", "z", "image_i", "image_j", "SCLK"}, false, 444) fmt.Printf("%v|%v|%v\n", cols, geom_corr, err) cols, geom_corr, err = parseBeamLocationHeaders([]string{"PMC", "x", "y", "z", "image_i", "SCLK", "image_j"}, false, 444) fmt.Printf("%v|%v|%v\n", cols, geom_corr, err) cols, geom_corr, err = parseBeamLocationHeaders([]string{"PMC", "x", "y", "z", "PMC_777_MCC_i", "PMC_3027_MCC_i", "PMC_777_MCC_j", "PMC_3027_MCC_j"}, true, 444) fmt.Printf("%v|%v|%v\n", cols, geom_corr, err) cols, geom_corr, err = parseBeamLocationHeaders([]string{"PMC", "x", "y", "z", "PMC_777_MCC_i", "PMC_777_MCC_j", "PMC_3027_MCC_i"}, true, 444) fmt.Printf("%v|%v|%v\n", cols, geom_corr, err) cols, geom_corr, err = parseBeamLocationHeaders([]string{"PMC", "x", "y", "z", "SCLK", "PMC_777_MCC_i", "PMC_777_MCC_j", "PMC_3027_MCC_i"}, true, 444) fmt.Printf("%v|%v|%v\n", cols, geom_corr, err) cols, geom_corr, err = parseBeamLocationHeaders([]string{"PMC", "SCLK", "y", "z", "PMC_777_MCC_i", "PMC_777_MCC_j"}, true, 444) fmt.Printf("%v|%v|%v\n", cols, geom_corr, err)
Output: [{777 4 5} {3027 6 7}]|-1|<nil> [{777 5 6} {3027 7 8}]|4|<nil> []|-1|Unexpected count of i/j columns []|-1|Unexpected column: geom_corr []|-1|Expected column image_i, got: PMC_777_MCC_i [{444 4 5}]|-1|<nil> [{444 4 5}]|-1|<nil> []|-1|Expected column image_j, got: SCLK []|-1|Unexpected column header PMC_3027_MCC_i after PMC_777_MCC_i []|-1|Unexpected count of i/j columns []|-1|Unexpected column: SCLK []|-1|Expected column x, got: SCLK
Example (ParseBeamLocationRow) ¶
pmc, beam, err := parseBeamLocationRow([]string{"33", "1.1", "1.2", "1.3", "55.1", "55.2"}, []pmcColIdxs{{20, 4, 5}}, -1) fmt.Printf("%v,%v|%v\n", pmc, beam, err) pmc, beam, err = parseBeamLocationRow([]string{"33", "1.1", "1.2", "1.3", "55.1", "55.2", "444", "8.1", "lala", "8.2"}, []pmcColIdxs{{777, 4, 5}, {320, 7, 9}}, -1) fmt.Printf("%v,%v|%v\n", pmc, beam, err) pmc, beam, err = parseBeamLocationRow([]string{"33", "1.1", "1.2", "1.3", "0.983", "55.1", "55.2", "444", "8.1", "lala", "8.2"}, []pmcColIdxs{{777, 5, 6}, {320, 8, 10}}, 4) fmt.Printf("%v,%v|%v\n", pmc, beam, err)
Output: 33,{1.1 1.2 1.3 0 map[20:{55.1 55.2}]}|<nil> 33,{1.1 1.2 1.3 0 map[320:{8.1 8.2} 777:{55.1 55.2}]}|<nil> 33,{1.1 1.2 1.3 0.983 map[320:{8.1 8.2} 777:{55.1 55.2}]}|<nil>
Example (ParseBeamLocations) ¶
data, err := parseBeamLocations([][]string{[]string{"PMC", "x", "y", "z", "image_i", "image_j"}, []string{"33", "1.1", "1.2", "1.3", "55.1", "55.2"}}, false, 222) fmt.Printf("%v|%v\n", data, err) data, err = parseBeamLocations([][]string{ []string{"PMC", "x", "y", "z", "PMC_22_MCC_i", "PMC_22_MCC_j", "PMC_62_MCC_i", "PMC_62_MCC_j"}, []string{"33", "31.1", "31.2", "31.3", "355.1", "355.2", "3121.4", "3121.5"}, []string{"66", "91.1", "91.2", "91.3", "955.1", "955.2", "9121.4", "9121.5"}, }, true, 333) fmt.Printf("%v|%v\n", data, err) data, err = parseBeamLocations([][]string{ []string{"PMC", "x", "y", "z", "geom_corr", "PMC_22_MCC_i", "PMC_22_MCC_j", "PMC_62_MCC_i", "PMC_62_MCC_j"}, []string{"33", "31.1", "31.2", "31.3", "1.03", "355.1", "355.2", "3121.4", "3121.5"}, []string{"66", "91.1", "91.2", "91.3", "0.99", "955.1", "955.2", "9121.4", "9121.5"}, }, true, 333) fmt.Printf("%v|%v\n", data, err)
Output: map[33:{1.1 1.2 1.3 0 map[222:{55.1 55.2}]}]|<nil> map[33:{31.1 31.2 31.3 0 map[22:{355.1 355.2} 62:{3121.4 3121.5}]} 66:{91.1 91.2 91.3 0 map[22:{955.1 955.2} 62:{9121.4 9121.5}]}]|<nil> map[33:{31.1 31.2 31.3 1.03 map[22:{355.1 355.2} 62:{3121.4 3121.5}]} 66:{91.1 91.2 91.3 0.99 map[22:{955.1 955.2} 62:{9121.4 9121.5}]}]|<nil>
Example (ParseMSAMetadataLine) ¶
lines := []string{ "#LIVETIME : 25.09, 25.08", "#OFFSET : 0.3, 0.1 eV of first channel", "#XPERCHAN : 10.0, 10.0 eV per channel", "#NCOLUMNS : 2 Number of data columns", "123", "Some:Thing", "#SOME TEXT HERE", "#FIELD:1234", "##THE FIELD:12.34", "#ANOTHER FIELD : 999", "#NCOLUMNS : 2 ", "#DATE : Date in the format DD-MMM-YYYY, for example 07-JUL-2010", "#LIVETIME : 9.87332058 ", "#XPERCHAN : 7.9226, 7.9273 eV per channel", } for _, line := range lines { k, v, err := parseMSAMetadataLine(line) fmt.Printf("%v|%v|%v\n", k, v, err) }
Output: LIVETIME|25.09, 25.08|<nil> OFFSET|0.3, 0.1|<nil> XPERCHAN|10.0, 10.0|<nil> NCOLUMNS|2|<nil> ||Expected # at start of metadata: 123 ||Expected # at start of metadata: Some:Thing ||Failed to parse metadata line: #SOME TEXT HERE FIELD|1234|<nil> THE FIELD|12.34|<nil> ANOTHER FIELD|999|<nil> NCOLUMNS|2|<nil> DATE||<nil> LIVETIME|9.87332058|<nil> XPERCHAN|7.9226, 7.9273|<nil>
Example (ParseMSASpectraLine) ¶
testData := []parseMSASpectraLineTestItem{ // 1 column parseMSASpectraLineTestItem{"1983", 7, 1}, parseMSASpectraLineTestItem{"1", 8, 1}, parseMSASpectraLineTestItem{"0", 9, 1}, // 2 columns parseMSASpectraLineTestItem{"1983, 44", 7, 2}, parseMSASpectraLineTestItem{"1, 0", 8, 2}, parseMSASpectraLineTestItem{"2321,32342", 9, 2}, // 3 columns (it doesn"t care) parseMSASpectraLineTestItem{"11, 22, 33", 9, 3}, // 0 columns (sanity) parseMSASpectraLineTestItem{"11, 22, 33", 9, 0}, // Wrong column counts parseMSASpectraLineTestItem{"1983, 44", 7, 1}, parseMSASpectraLineTestItem{"1983", 7, 2}, parseMSASpectraLineTestItem{"1983,", 7, 2}, parseMSASpectraLineTestItem{"", 7, 1}, parseMSASpectraLineTestItem{"", 7, 2}, parseMSASpectraLineTestItem{",", 7, 1}, parseMSASpectraLineTestItem{",", 7, 2}, // Issues with parsing values parseMSASpectraLineTestItem{"#SOMETHING", 1, 1}, parseMSASpectraLineTestItem{"#SOMETHING,#ELSE", 1, 2}, parseMSASpectraLineTestItem{"1,#Number", 1, 2}, parseMSASpectraLineTestItem{"Waffles", 2, 1}, parseMSASpectraLineTestItem{"1.6", 4, 1}, parseMSASpectraLineTestItem{"1.6, 3.1415926", 4, 2}, parseMSASpectraLineTestItem{"16,3.1415926", 4, 2}, parseMSASpectraLineTestItem{"-34, 10", 6, 2}, parseMSASpectraLineTestItem{"34, -10", 6, 2}, parseMSASpectraLineTestItem{"5, Waffles", 6, 2}, parseMSASpectraLineTestItem{"Waffles, 5", 6, 2}, } for _, t := range testData { v, e := parseMSASpectraLine(t.line, t.lc, t.ncols) fmt.Printf("%v|%v\n", v, e) }
Output: [1983]|<nil> [1]|<nil> [0]|<nil> [1983 44]|<nil> [1 0]|<nil> [2321 32342]|<nil> [11 22 33]|<nil> []|Expected 0 spectrum columns, got 3 on line [9]:11, 22, 33 []|Expected 1 spectrum columns, got 2 on line [7]:1983, 44 []|Expected 2 spectrum columns, got 1 on line [7]:1983 []|Failed to read spectra "" on line [7]:1983, []|Failed to read spectra "" on line [7]: []|Expected 2 spectrum columns, got 1 on line [7]: []|Expected 1 spectrum columns, got 2 on line [7]:, []|Failed to read spectra "" on line [7]:, []|Failed to read spectra "#SOMETHING" on line [1]:#SOMETHING []|Failed to read spectra "#SOMETHING" on line [1]:#SOMETHING,#ELSE []|Failed to read spectra "#Number" on line [1]:1,#Number []|Failed to read spectra "Waffles" on line [2]:Waffles []|Failed to read spectra "1.6" on line [4]:1.6 []|Failed to read spectra "1.6" on line [4]:1.6, 3.1415926 []|Failed to read spectra "3.1415926" on line [4]:16,3.1415926 []|Spectra expected non-negative value "-34" on line [6]:-34, 10 []|Spectra expected non-negative value "-10" on line [6]:34, -10 []|Failed to read spectra "Waffles" on line [6]:5, Waffles []|Failed to read spectra "Waffles" on line [6]:Waffles, 5
Example (ParsePsuedoIntensityData) ¶
pmcTableHeader := []string{"PMC", "x", "y", "z"} pmcTableData1 := []string{"77", "1", "2", "3"} pmcTableData2 := []string{"78", "4", "3", "2"} psHeader := []string{"pi1", "pi2", "pi3", "pi4", "pi5", "pi6"} psTableData1 := []string{"0.1", "0.2", "0.3", "0.4", "0.5", "0.6"} psTableData2 := []string{"10.1", "10.2", "10.3", "10.4", "10.5", "10.6"} csvData := [][]string{pmcTableHeader, pmcTableData1, pmcTableData2, psHeader, psTableData1, psTableData2} data, err := parsePsuedoIntensityData(csvData) fmt.Printf("%v|%v\n", err, len(data)) fmt.Printf("%v\n", data[77]) fmt.Printf("%v\n", data[78]) csvData = [][]string{pmcTableData1, pmcTableData2, psHeader, psTableData1, psTableData2} data, err = parsePsuedoIntensityData(csvData) fmt.Printf("%v|%v\n", err, data) csvData = [][]string{pmcTableHeader, pmcTableData1, []string{"oops", "1", "2", "3"}, psHeader, psTableData1, psTableData2} data, err = parsePsuedoIntensityData(csvData) fmt.Printf("%v|%v\n", err, data) csvData = [][]string{pmcTableHeader, pmcTableData1, pmcTableData1, psHeader, psTableData1, []string{"10.1", "10.2", "wtf", "10.4", "10.5", "10.6"}} data, err = parsePsuedoIntensityData(csvData) fmt.Printf("%v|%v\n", err, data)
Output: <nil>|2 [0.1 0.2 0.3 0.4 0.5 0.6] [10.1 10.2 10.3 10.4 10.5 10.6] expected first table to contain PMCs in first column, found: 77|map[] row 2 - expected PMC, got: oops|map[] row 5, col 3 - expected pseudointensity value, got: wtf|map[]
Example (ParseRanges) ¶
rangeHeader := []string{"Name", "StartChannel", "EndChannel"} range1 := []string{"ps1", "100", "120"} range2 := []string{"ps2", "144", "173"} csvData := [][]string{rangeHeader, range1, range2} data, err := parseRanges(csvData) fmt.Printf("%v|%v\n", err, len(data)) fmt.Printf("%+v\n", data[0]) fmt.Printf("%+v\n", data[1]) csvData = [][]string{[]string{"Date", "StartChannel", "EndChannel"}, range1, range2} data, err = parseRanges(csvData) fmt.Printf("%v|%v\n", err, data)
Output: <nil>|2 {Name:ps1 Start:100 End:120} {Name:ps2 Start:144 End:173} Pseudo-intensity ranges has unexpected headers|[]
Example (ScanHousekeepingData) ¶
data := [][]string{ {"ONE", "TWO", "PMC", "THREE", "FOUR"}, {"13", "14", "34", "3.1415926", "44"}, {"13", "13.33", "999", "55", "N/A"}, {"Some other header"}, {"TABLE", "TWO", "GOES", "HERE", "DUDE"}, {"1", "2", "3", "4", "5"}, } headers, pmcCol, dataTypes, rowCount := scanHousekeepingData(data) fmt.Printf("%v|%v|%v|%v\n", headers, pmcCol, dataTypes, rowCount) data = [][]string{ {"ONE", "TWO", "PMC", "THREE"}, {"13", "14", "34", "3.1415926"}, {"13", "11", "999", "Fifty-Five"}, {"1", "2", "3", "4"}, } headers, pmcCol, dataTypes, rowCount = scanHousekeepingData(data) fmt.Printf("%v|%v|%v|%v\n", headers, pmcCol, dataTypes, rowCount)
Output: [ONE TWO THREE FOUR]|2|[MT_INT MT_FLOAT MT_INT MT_FLOAT MT_STRING]|3 [ONE TWO THREE]|2|[MT_INT MT_INT MT_INT MT_STRING]|4
Example (SplitColumnHeader) ¶
pmc, data, ij, err := splitColumnHeader("PMC_333_corr_i") fmt.Printf("%v,%v,%v|%v\n", pmc, data, ij, err) pmc, data, ij, err = splitColumnHeader("PMC_777_MCC_j") fmt.Printf("%v,%v,%v|%v\n", pmc, data, ij, err) pmc, data, ij, err = splitColumnHeader("PMC_777_MC_j") fmt.Printf("%v,%v,%v|%v\n", pmc, data, ij, err) pmc, data, ij, err = splitColumnHeader("PMC_bob_MCC_j") fmt.Printf("%v,%v,%v|%v\n", pmc, data, ij, err) pmc, data, ij, err = splitColumnHeader("PMC_777_MCC_k") fmt.Printf("%v,%v,%v|%v\n", pmc, data, ij, err) pmc, data, ij, err = splitColumnHeader("PMc_777_MCC_j") fmt.Printf("%v,%v,%v|%v\n", pmc, data, ij, err) pmc, data, ij, err = splitColumnHeader("nan") fmt.Printf("%v,%v,%v|%v\n", pmc, data, ij, err)
Output: 333,corr,i|<nil> 777,MCC,j|<nil> 0,,|Unexpected column: PMC_777_MC_j 0,,|Unexpected column: PMC_bob_MCC_j 0,,|Unexpected column: PMC_777_MCC_k 0,,|Unexpected column: PMc_777_MCC_j 0,,|Unexpected column: nan
Example (SplitMSAMetaFor2Detectors) ¶
meta := converterModels.MetaData{ "COMMENT": converterModels.StringMetaValue("My Comment"), "XPERCHAN": converterModels.StringMetaValue(" 10.30, 11.30 "), "OFFSET": converterModels.StringMetaValue(" 3.30, 5.30 "), "SIGNALTYPE": converterModels.StringMetaValue(" XRF"), "DATATYPE": converterModels.StringMetaValue("YY"), "PMC": converterModels.IntMetaValue(99), "SCLK": converterModels.IntMetaValue(399), "XPOSITION": converterModels.StringMetaValue(" 1.0030"), "YPOSITION": converterModels.FloatMetaValue(2.0040), "ZPOSITION": converterModels.FloatMetaValue(2.4430), "LIVETIME": converterModels.StringMetaValue(" 25.090, 25.080"), "REALTIME": converterModels.StringMetaValue(" 25.110, 25.120"), "TRIGGERS": converterModels.StringMetaValue(" 45993, 43902"), "EVENTS": converterModels.StringMetaValue(" 44690, 42823"), "KETEK_ICR": converterModels.StringMetaValue(" 1833.1, 1750.7"), "KETEK_OCR": converterModels.StringMetaValue(" 1780.1, 1705.7"), "DATE": converterModels.StringMetaValue("03-20-2018"), "TIME": converterModels.StringMetaValue("13:10:30"), "NPOINTS": converterModels.StringMetaValue("4096"), "NCOLUMNS": converterModels.StringMetaValue("2"), "XUNITS": converterModels.StringMetaValue("eV"), "YUNITS": converterModels.StringMetaValue("COUNTS"), } a, b, e := splitMSAMetaFor2Detectors(meta, false) fmt.Printf("%v\n", e) fmt.Println("META A") fmt.Printf("%v\n", a.ToString()) fmt.Println("META B") fmt.Printf("%v\n", b.ToString()) meta = converterModels.MetaData{ "COMMENT": converterModels.StringMetaValue("My comment"), "LIVETIME": converterModels.StringMetaValue(" 25.09, 25.08, 30"), } a, b, e = splitMSAMetaFor2Detectors(meta, false) fmt.Printf("%v\n", e)
Output: <nil> META A [COMMENT:My Comment/s DATATYPE:YY/s DATE:03-20-2018/s DETECTOR_ID:A/s EVENTS:44690/s KETEK_ICR:1833.1/s KETEK_OCR:1780.1/s LIVETIME:25.09/f NCOLUMNS:2/s NPOINTS:4096/s OFFSET:3.3/f PMC:99/i REALTIME:25.11/f SCLK:399/i SIGNALTYPE:XRF/s TIME:13:10:30/s TRIGGERS:45993/s XPERCHAN:10.3/f XPOSITION:1.0030/s XUNITS:eV/s YPOSITION:2.004/f YUNITS:COUNTS/s ZPOSITION:2.443/f] META B [COMMENT:My Comment/s DATATYPE:YY/s DATE:03-20-2018/s DETECTOR_ID:B/s EVENTS:42823/s KETEK_ICR:1750.7/s KETEK_OCR:1705.7/s LIVETIME:25.08/f NCOLUMNS:2/s NPOINTS:4096/s OFFSET:5.3/f PMC:99/i REALTIME:25.12/f SCLK:399/i SIGNALTYPE:XRF/s TIME:13:10:30/s TRIGGERS:43902/s XPERCHAN:11.3/f XPOSITION:1.0030/s XUNITS:eV/s YPOSITION:2.004/f YUNITS:COUNTS/s ZPOSITION:2.443/f] Metadata row cannot be split for 2 detectors due to commas
Index ¶
- func GetDirListing(path string, extFilterOrEmpty string, jobLog logger.ILogger) ([]string, error)
- func LogIfMoreFoundMSA(m converterModels.DetectorSampleByPMC, typename string, morethan int)
- func ReadBeamLocationsFile(path string, expectMultipleIJ bool, mainImagePMC int32, jobLog logger.ILogger) (converterModels.BeamLocationByPMC, error)
- func ReadCSV(path string, headerIdx int, sep rune, jobLog logger.ILogger) ([][]string, error)
- func ReadFileLines(path string, jobLog logger.ILogger) ([]string, error)
- func ReadHousekeepingFile(path string, headerRowCount int, jobLog logger.ILogger) (converterModels.HousekeepingData, error)
- func ReadJSON(path string, ifcPtr interface{}, jobLog logger.ILogger) error
- func ReadMSAFileLines(lines []string, singleDetectorMSA bool, expectPMC bool, ...) ([]converterModels.DetectorSample, error)
- func ReadPseudoIntensityFile(path string, expectHeaderRow bool, jobLog logger.ILogger) (converterModels.PseudoIntensities, error)
- func ReadPseudoIntensityRangesFile(path string, jobLog logger.ILogger) ([]converterModels.PseudoIntensityRange, error)
- type Importer
Examples ¶
- Package (ConvertHousekeepingData)
- Package (ParseBeamLocationHeaders)
- Package (ParseBeamLocationRow)
- Package (ParseBeamLocations)
- Package (ParseMSAMetadataLine)
- Package (ParseMSASpectraLine)
- Package (ParsePsuedoIntensityData)
- Package (ParseRanges)
- Package (ScanHousekeepingData)
- Package (SplitColumnHeader)
- Package (SplitMSAMetaFor2Detectors)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetDirListing ¶
func LogIfMoreFoundMSA ¶
func LogIfMoreFoundMSA(m converterModels.DetectorSampleByPMC, typename string, morethan int)
func ReadBeamLocationsFile ¶
func ReadBeamLocationsFile(path string, expectMultipleIJ bool, mainImagePMC int32, jobLog logger.ILogger) (converterModels.BeamLocationByPMC, error)
ReadBeamLocationsFile - Reads beam location CSV. Old style (expectMultipleIJ=false) or new multi-image IJ coord CSVs
func ReadHousekeepingFile ¶
func ReadHousekeepingFile(path string, headerRowCount int, jobLog logger.ILogger) (converterModels.HousekeepingData, error)
func ReadMSAFileLines ¶
func ReadMSAFileLines(lines []string, singleDetectorMSA bool, expectPMC bool, detectorADuplicate bool) ([]converterModels.DetectorSample, error)
func ReadPseudoIntensityFile ¶
func ReadPseudoIntensityFile(path string, expectHeaderRow bool, jobLog logger.ILogger) (converterModels.PseudoIntensities, error)
func ReadPseudoIntensityRangesFile ¶
func ReadPseudoIntensityRangesFile(path string, jobLog logger.ILogger) ([]converterModels.PseudoIntensityRange, error)
Types ¶
type Importer ¶
type Importer interface {
Import(importPath string, pseudoIntensityRangesPath string, jobLog logger.ILogger) (*converterModels.OutputData, string, error)
}
Source Files ¶
Click to show internal directories.
Click to hide internal directories.