Events API
Events API¶
CHIME/FRB Events API.
add_measured_parameters
¶
Append a new set of measured parameters to CHIME/FRB Event.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
measured_parameters
|
Union[Dict[Any, Any], List[Dict[Any, Any]]]
|
[dict] list of a dictionary of measured parameters to update, valid values for each item in the list are |
required |
pipeline
|
{ name: str Name of the pipeline used to generate measured parameters status: str Status of the Pipeline SCHEDULED IN PROGRESS COMPLETE ERROR UNKNOWN log: str Small message describing the pipeline run. version: version of the pipeline used to make the measured parameters } dm : float dm_error : float width : float width_error : float snr : float dm_index : float dm_index_error : float flux : float flux_error : float fluence : float fluence_error : float spectral_running : float spectral_running_error : float frequency_mean : float frequency_mean_error : float frequency_width : float frequency_width_error : float fitburst_reference_frequency : float fitburst_reference_frequency_scattering : float ftest_statistic : float is_bandpass_calibrated : bool fixed : dict sub_burst_dm : list sub_burst_dm_error : list sub_burst_fluence : list sub_burst_fluence_error : list sub_burst_snr : list sub_burst_spectral_index : list sub_burst_spectral_index_error : list sub_burst_spectral_running : list sub_burst_spectral_running_error : list sub_burst_timestamp : list sub_burst_timestamp_error : list sub_burst_timestamp_UTC : list sub_burst_timestamp_UTC_error : list sub_burst_width : list sub_burst_width_error : list sub_burst_scattering_timescale : list sub_burst_scattering_timescale_error : list scattering_index : float scattering_index_error : float scattering_timescale : float scattering_timescale_error : float linear_polarization_fraction : float linear_polarization_fraction_error : float circular_polarization_fraction : float circular_polarization_fraction_error : float spectral_index : float spectral_index_error : float rotation_measure : float rotation_measure_error : float redshift_host : float redshift_host_error : float dispersion_smearing : float dispersion_smearing_error : float spin_period : float spin_period_error : float ra : float ra_error : float dec : float dec_error : float gl : float gb : float system_temperature : float beam_number : int galactic_dm : dict gain : list expected_spectrum: list bw_low_frequencies_mhz: list bw_high_frequencies_mhz: list bw_chi2_reduced: list bw_rpl_fit: list mb_bandwidth_mhz: float chi2: float nfitdata: int npars: int |
required |
Returns:
Name | Type | Description |
---|---|---|
db_response |
bool
|
dict |
get_event
¶
Get CHIME/FRB Events Information. Single or multiple events.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
event_number
|
Union[int, List[int]]
|
CHIME/FRB Event Number (int) or list of Event Numbers (List[int]) |
required |
full_header
|
bool
|
Get the full event from L4, default is False |
False
|
Returns:
Type | Description |
---|---|
Union[dict, Dict[str, dict]]
|
Dict (for single event) or Dict[str, dict] (for multiple events) |
Example
single_event = events.get_event(71780219) multi_event = events.get_event([71780219, 71780218])
Note: The maximum number of events that can be requested at once is 5000.
get_file
¶
Get a file from CHIME/FRB Backend.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
filename
|
str
|
Filename on the CHIME/FRB Archivers |
required |
Returns:
Type | Description |
---|---|
bytes
|
Raw byte-encoded datastream |
Example
response = master.frb_master.get_file('/some/file/name') with open('filename.png', 'wb') as f: for chunk in response.iter_content(1024): f.write(chunk)