cosmogrb.universe package

Submodules

cosmogrb.universe.survey module

class cosmogrb.universe.survey.Observation(grb_save_file, grb_detector_file=None, population=None, idx=None)[source]

Bases: object

detector_info
grb
class cosmogrb.universe.survey.Survey(grb_save_files, population_file, grb_detector_files=None)[source]

Bases: collections.OrderedDict

classmethod from_file(file_name)[source]

create a universe

Parameters:
  • cls
  • file_name
Returns:

Return type:

info()[source]

display the information about the survey

Returns:
Return type:
is_processed
n_detected
n_grbs
population
process(detector_type, client=None, serial=False, **kwargs)[source]

Process the triggers or detectors in the survey. This runs the provided GRBDetector type on each of the GRBs and prepares the information

Parameters:
  • detector_type – a class of GRBDetector type
  • client – the dask client
  • serial – True/False for if the survey is processed without dask
Returns:

Return type:

write(file_name)[source]

write the info to a file. if the universe has been processed, this information is also written

Parameters:file_name
Returns:
Return type:

cosmogrb.universe.universe module

class cosmogrb.universe.universe.GRBWrapper(parameter_server, serial=False)[source]

Bases: object

class cosmogrb.universe.universe.ParameterServer(name, ra, dec, z, duration, T0, **kwargs)[source]

Bases: object

file_path
parameters
set_file_path(file_path)[source]
class cosmogrb.universe.universe.Universe(population_file, grb_base_name='SynthGRB', save_path='.')[source]

Bases: object

Documentation for Universe

go(client=None)[source]

Launch the creation of the Universe of GRBs. If no client is passed, it is done serially.

Parameters:client
Returns:
Return type:
save(file_name)[source]

Save the infomation from the simulation to and HDF5 file

Parameters:file_name
Returns:
Return type:

Module contents