meascsv: Legacy MCPT log file parser

This parser handles the reading and processing of the legacy log files created by the LabView interface for the MCPT instrument. With a provided calibration, this parser calculates the temperature, inlet composition, and the inlet flow of the MCPT instrument.

Warning

As of yadg-4.0.0, this parser is deprecated and is no longer maintained. Please consider switching to other parsers.

Usage

The use of meascsv can be requested by supplying meascsv to the parser keyword in the dataschema. The following additional parameters are supported by the parser:

pydantic model dgbowl_schemas.yadg.dataschema_4_1.step.MeasCSV.Params

Show JSON schema
{
   "title": "Params",
   "type": "object",
   "properties": {
      "timestamp": {
         "title": "Timestamp",
         "default": {
            "timestamp": {
               "index": 0,
               "format": "%Y-%m-%d-%H-%M-%S"
            }
         },
         "anyOf": [
            {
               "$ref": "#/definitions/Timestamp"
            },
            {
               "$ref": "#/definitions/TimeDate"
            },
            {
               "$ref": "#/definitions/UTS"
            }
         ]
      },
      "calfile": {
         "title": "Calfile",
         "type": "string"
      },
      "convert": {
         "title": "Convert"
      }
   },
   "additionalProperties": false,
   "definitions": {
      "TimestampSpec": {
         "title": "TimestampSpec",
         "type": "object",
         "properties": {
            "index": {
               "title": "Index",
               "type": "integer"
            },
            "format": {
               "title": "Format",
               "type": "string"
            }
         },
         "additionalProperties": false
      },
      "Timestamp": {
         "title": "Timestamp",
         "type": "object",
         "properties": {
            "timestamp": {
               "$ref": "#/definitions/TimestampSpec"
            }
         },
         "required": [
            "timestamp"
         ],
         "additionalProperties": false
      },
      "TimeDate": {
         "title": "TimeDate",
         "type": "object",
         "properties": {
            "date": {
               "$ref": "#/definitions/TimestampSpec"
            },
            "time": {
               "$ref": "#/definitions/TimestampSpec"
            }
         },
         "additionalProperties": false
      },
      "UTS": {
         "title": "UTS",
         "type": "object",
         "properties": {
            "uts": {
               "$ref": "#/definitions/TimestampSpec"
            }
         },
         "required": [
            "uts"
         ],
         "additionalProperties": false
      }
   }
}

field timestamp: Union[dgbowl_schemas.yadg.dataschema_4_1.timestamp.Timestamp, dgbowl_schemas.yadg.dataschema_4_1.timestamp.TimeDate, dgbowl_schemas.yadg.dataschema_4_1.timestamp.UTS] = Timestamp(timestamp=TimestampSpec(index=0, format='%Y-%m-%d-%H-%M-%S'))
field calfile: Optional[str] = PydanticUndefined
field convert: Optional[Any] = PydanticUndefined

Provides

The parser is used to extract all of the tabular data in the input file, storing them using the column headers as keys. The functionality exposed by this parser is using basiccsv behind the scenes.

Metadata

The metadata section is currently empty.

Submodules

yadg.parsers.meascsv.main.process(fn, encoding='utf-8', timezone='localtime', parameters=None)

Legacy MCPT measurement log parser.

This parser is included to maintain parity with older schemas and datagrams. It is essentially a wrapper around yadg.parsers.basiccsv.process_row(). For new applications, please use the basiccsv parser.

Parameters
  • fn (str) – File to process

  • encoding (str) – Encoding of fn, by default “utf-8”.

  • timezone (str) – A string description of the timezone. Default is “localtime”.

  • parameters (Optional[BaseModel]) – Parameters for MeasCSV.

Returns

(data, metadata, fulldate) – Tuple containing the timesteps, metadata, and full date tag. No metadata is returned. The full date is always provided in meascsv-compatible files.

Return type

tuple[list, dict, bool]