adios_db.data_sources.exxon_assays.v1 package

Submodules

adios_db.data_sources.exxon_assays.v1.mapper module

Exxon Mapper Version 1

Not really a class – it’s really a function that build up an oil object

adios_db.data_sources.exxon_assays.v1.mapper.ExxonMapperV1(record)

Accepts and Exxon record:

tuple of:
  • oil name

  • list of lists of the spreadsheet contents

returns an Oil Object

adios_db.data_sources.exxon_assays.v1.mapper.apply_map(data, cut_table, samples)
adios_db.data_sources.exxon_assays.v1.mapper.create_middle_tier_objs(samples)

These are the dataclasses that comprise the attributes of the Sample

adios_db.data_sources.exxon_assays.v1.mapper.process_cut_table(oil, samples, cut_table)

process the parts that aren’t a simple map

adios_db.data_sources.exxon_assays.v1.mapper.read_cut_table(sample_names, data)

Read the rest of the rows and save them in a dictionary.

  • key: first field of the row

  • value: the rest of the fields as a list. The index position in the

    list will be correlated to the sample names that were captured.

Note:

Some datasheets (curlew) have some empty columns in between the sample data and the properties column. So we need to make sure there actually exists a sample name field before adding it to our cut table data.

adios_db.data_sources.exxon_assays.v1.mapper.read_header(data)

fixme: this should probably be more flexible but we can wait ‘till we get data that doesn’t match it could / should read the whole dist cut table, then map it to the samples Exxon info in the header

adios_db.data_sources.exxon_assays.v1.mapper.read_identification(data)
adios_db.data_sources.exxon_assays.v1.mapper.sample_id_attrs(name)
adios_db.data_sources.exxon_assays.v1.mapper.set_boiling_point_range(samples, cut_table)

Parse the names to determine the boiling point ranges Requires the sample names to be initialized

Need to know: - Initial boiling point (IBF) - End boiling point (EP)

adios_db.data_sources.exxon_assays.v1.mapper.set_sample_property(samples, row, attr, unit, cls, unit_type=None, convert_from=None, element_of=None, num_digits=5)

reads a row from the spreadsheet, and sets the sample properties

Notes:

  • optional rounding to “num_digits” digits

  • optional converting to unit from convert_from (if the data aren’t in the right units)

  • These values are now kept in a list of compounds held by the bulk_composition attribute

  • The name & groups of each compound should be match the ADIOS data model controlled vocabulary