scopesim.utils#
Helper functions for ScopeSim.
Functions
|
Convert airmass to zenith distance. |
|
Return zenith distance in degrees. |
|
Create min and max from array of points, useful for footprint. |
Print versions of dependencies for inclusion in bug report. |
|
|
Like bug_report, but writes to file instead of printing. |
|
|
|
Check to see if all/any of the required keys are present in a dict. |
|
x, y = zip(*close_loop(zip(x, y))) |
|
Plot cube in separate plots for spatial and spectral parts. |
|
Derive (gradient) of a Polynomial2D model. |
|
Default way to init fig and ax, to easily modify later. |
|
Gridspec variant. |
|
Find a file in search path. |
|
Return the current value of a bang-string from |
|
|
|
|
|
Extract a Quantity from a dictionary. |
|
Check to see if the WCS keywords are in the header. |
|
Plot HDU image and add colorbar. |
|
|
|
Set |
|
Emit bug report as logging message. |
|
Enable or disable logging to file (convenience function). |
|
Return the index of the value from arr which is closest to val. |
|
Compute the parallactic angle. |
|
Calculate area covered by one pixel in arcsec**2 from header. |
|
Return the vector of powers of val up to a degree. |
|
|
|
Ensure an item is a Quantity. |
|
|
|
|
|
Replacement for numpy.arange modelled after R's seq function. |
|
Set the level for the console handler (convenience function). |
|
Set the local path for !SIM.file.local_packages_path (shortcut). |
|
Turn a dict entries into strings for addition to FITS headers. |
|
Catch any unhandled exceptions, log it including bug report. |
|
Look for the unit for a column based on the meta dict keyword "<col>_unit". |
|
Check if one of the unit's bases is of 1/physical_type. |
|
Reload logging configuration from |
|
Write a report string to file in latex or rst format. |
|
Convert zenith distance to airmass. |
|
zenith_dist is in degrees. |
|
Create all-zero array of the shape given by NAXISn keywords in header. |