lstpressure.lst
- class lstpressure.lst.LST(input: DataFrame | str | list[list[str]], input_filter: Callable[[list[str]], bool] | None = None, observation_filter: Callable[[Observation], bool] | None = None, calendar_start: str | datetime | None = None, calendar_end: str | datetime | None = None, latitude: str | float | None = '-30:42:39.8', longitude: str | float | None = '21:26:38.0', provider: LocationProviderType | None = None)
Wrap the LSTCalendar/Observation API for use with SARAO OPT CSV downloads.
Parameters
- inputDataFrame | str | list[list[str]]
The input data source, which can be a DataFrame, a file path to a CSV file, or a list of lists (rows).
- input_filterOptional[Callable[[list[list[str]]], bool]]
A filter function to apply to the input data during instantiation. Defaults to None.
- observation_filterOptional[Callable[[list[Observation]], bool]]
A filter function to apply to the observations data after filtering the input data. Defaults to None.
- calendar_startOptional[str | datetime]
The start date for the LST calendar. Defaults to the current date.
- calendar_endOptional[str | datetime]
The end date for the LST calendar. Defaults to the value of calendar_start.
Attributes
- dfDataFrame
The filtered DataFrame based on the input data and filters.
- inputstr | list[list[str]]
The input data source, which can be a file path to a CSV file, a DataFrame, or a list of lists (rows).
- calendar_startstr | datetime
The start date for the LST calendar.
- calendar_endstr | datetime
The end date for the LST calendar.
- observation_filterCallable[[list[Observation]], bool]
The filter function applied to the observations data.
- observationslist[Observation]
A list of Observation objects based on the filtered data.
- observableslist[Observable]
A list of Observable objects calculated based on the observations.
Methods
- write_to_csv(output: str) -> None:
Write the observables data to a CSV file.
- property calendar_start: str | datetime
The start date for the LST calendar.
Returns
- str | datetime
The start date.
- property df: DataFrame
The filtered DataFrame based on the input data and filters.
Returns
- DataFrame
The filtered DataFrame.
- property input: str | list[list[str]]
The input data source, which can be a file path to a CSV file, a DataFrame, or a list of lists (rows).
Returns
- str | list[list[str]]
The input data source.
- property observables: list[Observable]
A list of Observable objects calculated based on the observations.
Returns
- list[Observable]
A list of Observable objects.
- property observation_filter: Callable[[list[Observation]], bool]
The filter function applied to the observations data.
Returns
- Callable[[list[Observation]], bool]
The observation filter function.
- property observations: list[Observation]
A list of Observation objects based on the filtered data.
Returns
- list[Observation]
A list of Observation objects.