redback.get_data.lasair.LasairDataGetter

class redback.get_data.lasair.LasairDataGetter(transient: str, transient_type: str)[source]

Bases: DataGetter

__init__(transient: str, transient_type: str) None[source]

Constructor class for a data getter. The instance will be able to downloaded the specified Swift data.

Parameters:
  • transient (str) – Telephone number of GRB, e.g., ‘GRB140903A’ or ‘140903A’ are valid inputs.

  • transient_type (str) – Type of the transient. Must be from redback.get_data.open_data.LasairDataGetter.VALID_TRANSIENT_TYPES.

__call__(**kwargs)

Call self as a function.

Methods

__init__(transient, transient_type)

Constructor class for a data getter.

collect_data()

Downloads the data from Lasair website and saves it into the raw file path.

convert_raw_data_to_csv()

Converts the raw data into processed data and saves it into the processed file path.

get_data()

Downloads the raw data and produces a processed .csv file.

Attributes

VALID_TRANSIENT_TYPES

transient_type

Checks if the transient type is valid when setting.

url

The lasair raw data url.

collect_data() None[source]

Downloads the data from Lasair website and saves it into the raw file path.

convert_raw_data_to_csv() Optional[DataFrame][source]

Converts the raw data into processed data and saves it into the processed file path. The data columns are in OpenDataGetter.PROCESSED_FILE_COLUMNS.

Returns:

The processed data.

Return type:

pandas.DataFrame

get_data() DataFrame

Downloads the raw data and produces a processed .csv file.

Returns:

The processed data

Return type:

pandas.DataFrame

property transient_type: str

Checks if the transient type is valid when setting.

Returns:

The transient type.

Return type:

str

property url: str

The lasair raw data url. :rtype: str

Type:

return