These simulator functions are used to set up and run simulations in gateau.
More...
Functions | |
| Union[None, dict[str, any]] | gateau.simulator.simulator.initialise (self, float t_obs, float az0, float el0, Union[Callable, list[Callable]] scan_func, dict[str, any] instrument_dict, dict[str, any] telescope_dict, dict[str, any] atmosphere_dict, dict[str, any] source_dict, Union[list[dict[str, any]], str] cascade_list, str cascade_yaml="cascade.yaml", bool return_full=False) |
| Initialise a gateau setup. More... | |
| None | gateau.simulator.simulator.run (self, Union[str, Path] outname="out", bool overwrite=False, str outscale="Tb", int seed=0) |
| Run a gateau simulation. More... | |
These simulator functions are used to set up and run simulations in gateau.
| Union[None, dict[str, any]] gateau.simulator.simulator.initialise | ( | self, | |
| float | t_obs, | ||
| float | az0, | ||
| float | el0, | ||
| Union[Callable, list[Callable]] | scan_func, | ||
| dict[str, any] | instrument_dict, | ||
| dict[str, any] | telescope_dict, | ||
| dict[str, any] | atmosphere_dict, | ||
| dict[str, any] | source_dict, | ||
| Union[list[dict[str, any]], str] | cascade_list, | ||
| str | cascade_yaml = "cascade.yaml", |
||
| bool | return_full = False |
||
| ) |
Initialise a gateau setup.
THis function needs to be called before running a simulation. Here, a lot of intermediary user-supplied quantities are converted into quantities used by gateau.
| t_obs | Total observation time for simulation, in seconds. |
| az0 | Central azimuth value for the (first) scan pattern, in degrees. |
| el0 | Central elevation value for the (first) scan pattern, in degrees. |
| scan_func | Function handle of the function defining the scan pattern. First argument must be a Numpy array consisting of timestamps. Second and third argument must be scalars or Numpy arrays containing central azimuth and elevation values, respectively. The 'scan_func' argument can also be a list of function handles. In this case, the first function in the list is evaluated using az0 and el0 as supplied to this function. Then, the output is passed to the next function handle in the list. |
| instrument_dict | Dictionary containing instrument specification. |
| telescope_dict | Dictionary containing telescope specification. |
| atmosphere_dict | Dictionary containing atmosphere specification. |
| source_dict | Dictionary containing source specification. |
| cascade_list | List containing the cascade to be used. Can also be a string containg the path to the folder containing a cascade .yaml file. |
| cascade_yaml | Name of .yaml file containing cascade. Only used if 'cascade_list' is a string containing a folder with a cascade .yaml. Defaults to 'cascade.yaml'. |
| return_full | Boolean determining whether extra output is returned. This extra output might be useful when you want to process the actual gateau output further. Defaults to False. |
| None gateau.simulator.simulator.run | ( | self, | |
| Union[str, Path] | outname = "out", |
||
| bool | overwrite = False, |
||
| str | outscale = "Tb", |
||
| int | seed = 0 |
||
| ) |
Run a gateau simulation.
This is the main routine of gateau and should be called after filling all dictionaries and running the 'initialise' method.
| outname | Name of output hdf5 file. If a path, will place output in the path. Defaults to 'out', which will place the output in 'out.hdf5' in your working directory. |
| overwrite | Whether to overwrite existing output directories. If False (default), a prompt will appear to either overwrite or terminate simulation. |
| outscale | Store output in brightness temperature [K] or power [W]. Accepts "Tb" or "P". Defaults to "Tb". |
| seed | Seed for photon and pink noise generation. Defaults to 0, which will internally be converted to a random seed using the current time. |