Skip to content

Parameters API

Parameters API

CHIME/FRB Parameters API.

__init__

Python
__init__(API)

Initialize the Parameters API.

get_beam_info

Python
get_beam_info(beam_number=None)

Get CHIME/FRB Beam Information.

Parameters:

Name Type Description Default
beam_number

CHIME/FRB Beam Number, e.g. 2238

None

Returns:

Type Description

dict

Raises:

Type Description
TypeError

If beam_number is not provided or not an integer

get_datapath_size

Python
get_datapath_size(datapath=None)

Returns the size (in bytes) of a folder and its sub-directories.

Parameters:

Name Type Description Default
datapath Optional[str]

Absolute path to directory

None

Returns:

Name Type Description
integer int

Size of the directory in bytes

get_datapaths

Python
get_datapaths(event_number=None)

Returns top-level folders for each CHIME/FRB event number.

Parameters:

Name Type Description Default
event_number Optional[int]

CHIME/FRB Event Number

None

Returns:

Type Description
list

List of data paths

Raises:

Type Description
AttributeError

if event_number is not provided

get_filenames

Python
get_filenames(event_number=None)

Get analysed data product filenames for an event.

Parameters:

Name Type Description Default
event_number Optional[int]

CHIME/FRB Event Number

None

Returns:

Name Type Description
filenames List[Any]

Returns a list of filenames attached to an event

get_frame0_nano

Python
get_frame0_nano(event_date)

Get the frame0_nano for any given UTC Timestamp.

Parameters:

Name Type Description Default
event_date datetime

Datetime object containing the time of the event

required

Returns:

Name Type Description
frame0_nano float

frame0_nano time for the event datetime

get_max_size

Python
get_max_size(datapath=None, fileformat=None)

Returns the maximum size of a file under a datapath.

Parameters:

Name Type Description Default
datapath Optional[str]

Absolute path to directory

None
fileformat Optional[str]

Format of the file to search

None

Returns:

Name Type Description
max_file_size int

maximum file size in bytes

get_node_info

Python
get_node_info(node_name=None)

Get CHIME/FRB Compute Node Information.

Parameters:

Name Type Description Default
node_name Optional[str]

CHIME/FRB Compute Node Name, e.g. cf1n1

None

Returns:

Type Description

dict