Tools

Standard usage of gwtoolbox involves instantiating Tools from Earth or space

Earth

class gwtoolbox.tools_earth.Tools(detID, popID, cosmos, det_setup=None)[source]

This is a class with tools to manipulate GW detectors and sources on Earth.

Parameters:
  • detID (int) – detector id
  • popID (int) – population id
  • cosmos (class) – cosmological model
  • det_setup (Optional[list of floats]) – parameters to modify the detector noise
detector

detector setup class

Type:class
ant_pat

detector shape

Type:array of dtype float
noise

detector noise

Type:array of dtype float
list_param_errors()[source]

Return array of final parameter errors. It can be used only after list_params is used.

Returns:errors m1,m2,chi
Return type:(list of arrays of dtype float)
list_params(time_obs=10000.0, rho_cri=8.0, size=None)[source]

Return an array of final parameters.

Parameters:
  • time_obs (float) – Observation time, in unit of minute
  • rho_cri (float) – The SNR threshold of detection
  • size (Optional[int]) – sample size
Returns:

samples

Return type:

(list of arrays of dtype float)

total_number(time_obs=10000.0, rho_cri=8.0)[source]

Return the expected number of detections.

Parameters:
  • time_obs (float) – Observation time, in unit of minute
  • rho_cri (float) – The SNR threshold of detection
Returns:

expected number of detections

Return type:

(float)

Space

class gwtoolbox.tools_space.Tools(detID, popID, cosmos, det_setup=None)[source]

This is a class with tools to manipulate GW detectors and sources in space.

Parameters:
  • detID (int) – detector id
  • popID (int) – population id
  • cosmos (class) – cosmological model
  • det_setup (Optional[list of floats]) – parameters to modify the detector noise
detector

detector setup class

Type:class
ant_pat

detector shape

Type:array of dtype float
noise

detector noise

Type:array of dtype float
list_param_errors()[source]

Return array of final parameter errors. It can be used only when list_params was used before.

Returns:errors m1,m2,chi
Return type:(array of dtype float)
list_params(time_obs=10000.0, rho_cri=8.0, list_all=False)[source]

Return an array of final parameters.

Parameters:
  • time_obs (float) – Observation time, in unit of minute
  • rho_cri (float) – The SNR threshold of detection
  • list_all (Optional[boolean]) – to decide how large sample
Returns:

samples

Return type:

(array of dtype float)

total_number(time_obs=10000.0, rho_cri=8.0)[source]

Return the expected number of detections.

Parameters:
  • time_obs (float) – Observation time, in unit of minute
  • rho_cri (float) – The SNR threshold of detection
Returns:

expected number of detections

Return type:

(float)