Find the line numbers of start and end of the isotherm data

findDataBlocks(lines: Array<string>): Array<number>
Parameters
lines (Array<string>)
Returns
Array<number>: array of length two [startIndex, endIndex]

Orchestrates the parsing of a Belsorp Excel (xls) file.

fromBelsorp(dataFile: Buffer): Analysis
Parameters
dataFile (Buffer) input excel file, e.g., read with readfilesync
Returns
Analysis:

Orchestrates the parsing of a IGA file. Creates a new Analysis element

fromIGA(text: string): Analysis
Parameters
text (string) String containing the IGA analysis data, maybe contain multiple measurements
Returns
Analysis: New class element with the given data

Create an Analysis object from a micrometrics CSV file

fromMicrometricsCSV(text: string): Analysis
Parameters
text (string)
Returns
Analysis:

Orchestrates the parsing of a micrometrics TXT file. Takes the text and returns an Analysis object. Also parses relevant metadata and converts some units

fromMicrometricsTXT(text: string): Analysis
Parameters
text (string)
Returns
Analysis:

Find metadata in the excelsheet and safe it with standardized names

getAdsDesMeta(adsDesSheet: object): object
Parameters
adsDesSheet (object) sheetjs worksheet
Returns
object:

getLineNumbersOfMeasurement

src/from/fromIGA.js

Find the start and end line numbers of the measurement

getLineNumbersOfMeasurement(lines: Array<string>): Array<number>
Parameters
lines (Array<string>)
Returns
Array<number>: Array of length 2 [startIndex, endIndex]

Converts an excel file to a matrix

getMatrixFromWorkbook(workbook: object): array
Parameters
workbook (object) XLSX Excel workbook
Returns
array: Matrix of cells

Converts an excel file to a matrix

getMatrixFromWorkbook(workbook: object): array
Parameters
workbook (object) XLSX Excel workbook
Returns
array: Matrix of cells

Separates the label and its unit

labelUnit(label: string): object
Parameters
label (string) to separate
Returns
object: Object containing the unit and label

Finds the cells with the isotherm data and calls the parser on them

parseAdsDesData(worksheet: object, adsorptionPoints: number, desorptionPoints: number): object
Parameters
worksheet (object) sheetjs worksheet
adsorptionPoints (number) number of pressure points in the adsorption measurement
desorptionPoints (number) number of pressure points in the desorption measurement
Returns
object: with keys adsorption and desorption, values of which are arrays of floats

Parses a cells matrix and returns the meta and the variables

parseHeader(matrix: array): Object
Parameters
matrix (array) Cells matrix extracted from the file
Returns
Object: Object containing the meta and ending row

parseIGAMeasurmentHeader

src/from/fromIGA.js

Parses and standardizes the metadata

parseIGAMeasurmentHeader(lines: Array<string>): object
Parameters
lines (Array<string>)
Returns
object:

parseIsothermBlock

src/from/fromBelsorp.js

Parses the cells with actual isotherm data

parseIsothermBlock(worksheet: object, range: object)
Parameters
worksheet (object) sheetjs worksheet
range (object) sheetjs range

Parses the relevant fields from the isotherm table, converts the pressure to kPa and creates floats

parseIsothermTable(lines: Array<string>): Object
Parameters
lines (Array<string>)
Returns
Object:

Parses the header/meta of an excel workbook

parseMeta(baseMatrix: array): object
Parameters
baseMatrix (array) Matrix derived from the excel workbook
Returns
object: Object containing the meta data of the workbook

Parses some relevant fields in the meta data Tries to use naming that is consistent with the other isotherm parsers

parseMetaBlock(lines: Array<string>, dataStartIndex: number): object
Parameters
lines (Array<string>)
dataStartIndex (number)
Returns
object:

Parses an Excel workbook containing Micromeritics data

parseMicromeriticsExcel(workbook: object): object
Parameters
workbook (object) xlsx workbook to parse
Returns
object: Object with meta data and tables data

Parses the whole excel file

parseRubotherm(workbook: object): object
Parameters
workbook (object) XLSX Excel workbook to parse
Returns
object: Object with meta object and variables array

Parses a table

parseTable(matrix: array, options: object): array
Parameters
matrix (array) Cells data extracted from the file
options (object = {})
Name Description
options.i number? Starting row of the function
Returns
array: Array of objects corresponding to each column

Parses multiple tables in the file

parseTables(matrix: array): object
Parameters
matrix (array) Matrix containing the tables
Returns
object: Object containing multiple objects each corresponding to a table