redback.get_data.batse.BATSEDataGetter

class redback.get_data.batse.BATSEDataGetter(grb: str)[source]

Bases: GRBDataGetter

__init__(grb: str) None[source]

Constructor class for a data getter. The instance will be able to download the specified BATSE data.

Parameters:

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

__call__(**kwargs)

Call self as a function.

Methods

__init__(grb)

Constructor class for a data getter.

collect_data()

Downloads the data from HEASARC 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.

create_directory_structure()

Creates and returns the directory structure.

get_data()

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

Attributes

PROCESSED_FILE_COLUMNS

VALID_TRANSIENT_TYPES

grb

The GRB number with prepended 'GRB'.

stripped_grb

The GRB number without prepended 'GRB'.

transient_type

Checks if the transient type is valid when setting.

trigger

This method infers the BATSE trigger number from the given GRB name.

trigger_filled

Trigger number with prepended zeros.

url

collect_data() None[source]

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

convert_raw_data_to_csv() DataFrame[source]

Converts the raw data into processed data and saves it into the processed file path. The column names are in BATSEDataGetter.PROCESSED_FILE_COLUMNS.

Returns:

The processed data frame.

Return type:

pd.DataFrame

create_directory_structure() tuple[source]

Creates and returns the directory structure.

get_data() DataFrame

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

Returns:

The processed data

Return type:

pandas.DataFrame

property grb: str

The GRB number with prepended ‘GRB’. :rtype: str

Type:

return

property stripped_grb: str

The GRB number without prepended ‘GRB’. :rtype: str

Type:

return

property transient_type: str

Checks if the transient type is valid when setting.

Returns:

The transient type.

Return type:

str

property trigger: int

This method infers the BATSE trigger number from the given GRB name.

property trigger_filled: str

Trigger number with prepended zeros.