ios_shell.shell module
Contains high-level object representing the whole of an IOS Shell file.
- class ios_shell.shell.ShellFile(filename: str, modified_date: datetime, header_version: Version, file: FileInfo, administration: Administration, location: Location, instrument: Optional[Instrument], history: Optional[History], calibration: Optional[Calibration], deployment: Optional[Deployment], recovery: Optional[Recovery], raw: Optional[Raw], comments: str, data: Union[List[List[Any]], str], geo_code: str = 'None')
Bases:
objectRepresents the contents of an IOS Shell file.
- data_is_processed() bool
Determine whether or not the data in the file has already been processed.
- classmethod fromcontents(contents, process_data=True, filename='bare string')
Construct a ShellFile object from the contents of a string.
- classmethod fromfile(filename, process_data=True)
Construct a ShellFile object from the contents of a file.
- get_complete_header() Dict[str, Union[Dict[str, Any], str]]
Returns all the present header information contained in the source file
- get_location() Dict[str, float]
Produce a conventent dict of the longitude and latitude in the file.
- get_obs_time() List[datetime]
Returns a list of all the datetime objects associated with the data
- get_time() datetime
A time to associate the contents with.
Typically the START TIME field of *FILE
- process_data()
Perform the processing of the data.
- to_pandas()
Convert processed data to pandas.DataFrame
- Returns
a pandas.DataFrame if pandas is present and data has been processed, otherwise None
- administration: Administration
- calibration: Optional[Calibration]
- comments: str
- data: Union[List[List[Any]], str]
Data is assumed to be processed if it is a List[List[Any]], and unprocessed if it is a str.
Some data has been known to contain dates or arbitrary strings, so raw numpy arrays are difficult to make work.
- deployment: Optional[Deployment]
- filename: str
The file name the data originally came from. Useful for debugging.
- geo_code: str = 'None'
- instrument: Optional[Instrument]
- modified_date: datetime