noctua.utils package
Submodules
noctua.utils.analysis module
Analysis-related functions
- class noctua.utils.analysis.EllipticalMoffat(amplitude=2000, x_0=0, y_0=0, fwhm_x=9, fwhm_y=9, alpha=5, theta=0, **kwargs)[source]
Bases:
Fittable2DModelFrom: http://www.aspylib.com/doc/aspylib_fitting.html
- alpha = Parameter('alpha', value=5.0, bounds=(None, 10))
- amplitude = Parameter('amplitude', value=2000.0, bounds=(0, 65535))
- static evaluate(x, y, amplitude, x_0, y_0, fwhm_x, fwhm_y, alpha, theta)[source]
Evaluate the model on some input variables.
- fwhm_x = Parameter('fwhm_x', value=9.0)
- fwhm_y = Parameter('fwhm_y', value=9.0)
- param_names = ('amplitude', 'x_0', 'y_0', 'fwhm_x', 'fwhm_y', 'alpha', 'theta')
Names of the parameters that describe models of this type.
The parameters in this tuple are in the same order they should be passed in when initializing a model of a specific type. Some types of models, such as polynomial models, have a different number of parameters depending on some other property of the model, such as the degree.
When defining a custom model class the value of this attribute is automatically set by the ~astropy.modeling.Parameter attributes defined in the class body.
- theta = Parameter('theta', value=0.0, bounds=(-1.5707963267948966, 1.5707963267948966))
- x_0 = Parameter('x_0', value=0.0)
- y_0 = Parameter('y_0', value=0.0)
- class noctua.utils.analysis.Moffat2DXY(amplitude=2000, x_0=0, y_0=0, gamma_x=9, gamma_y=9, alpha=3, **kwargs)[source]
Bases:
Fittable2DModel- alpha = Parameter('alpha', value=3.0)
- amplitude = Parameter('amplitude', value=2000.0, bounds=(0, 65535))
- static evaluate(x, y, amplitude, x_0, y_0, gamma_x, gamma_y, alpha)[source]
Evaluate the model on some input variables.
- gamma_x = Parameter('gamma_x', value=9.0)
- gamma_y = Parameter('gamma_y', value=9.0)
- param_names = ('amplitude', 'x_0', 'y_0', 'gamma_x', 'gamma_y', 'alpha')
Names of the parameters that describe models of this type.
The parameters in this tuple are in the same order they should be passed in when initializing a model of a specific type. Some types of models, such as polynomial models, have a different number of parameters depending on some other property of the model, such as the degree.
When defining a custom model class the value of this attribute is automatically set by the ~astropy.modeling.Parameter attributes defined in the class body.
- x_0 = Parameter('x_0', value=0.0)
- y_0 = Parameter('y_0', value=0.0)
noctua.utils.check module
Collection of decorators to check several type of errors in specific types of functions.
- noctua.utils.check.ascom_errors(func)[source]
Decorator for handling exceptions on a class method. Put it on top of the class method.
- noctua.utils.check.content_errors(content)[source]
Decorator for handling exceptions. Put it on top of the content() method in the shinsapp class.
- noctua.utils.check.meteo_errors(func)[source]
Decorator for handling exceptions on a class method. Put it on top of the class method.
- noctua.utils.check.request_errors(func)[source]
Decorator for handling exceptions on a class method. Put it on top of the class method.
noctua.utils.coordinates module
Coordinates-related functions
- noctua.utils.coordinates.apply_offset(fits_file='temp.fits', box=100, model='moffat', display=False)[source]
Take an image, fit a Moffat2d on a centered box center supposing there is a star, calculate the offset with respect to the center, sum it to the existing telescope offset.
- noctua.utils.coordinates.calculate_offset(string='13 56 44 +27 28 01', header=None)[source]
Take a string of coordinates representing what is expected to be the center of an OARPAF FITS image, and the header of that FITS image. Uses the coordinates of that image to calculate the difference between that point and the center of the image in [alt, az], units of deg.
- noctua.utils.coordinates.to_hms(number)[source]
Transform a value in units of degrees, i.e. 89.0, in a string coordinate, i.e. “+89 00 00”.
- noctua.utils.coordinates.to_hms_dms(array, join=False)[source]
Transform an array of coordinates from units of degrees, i.e. [12.0, 89.0] in an array of string coordinates, i.e. [“12 00 00”, “+89 00 00”].
noctua.utils.data_access_object module
noctua.utils.logger module
Custom format log
noctua.utils.structure module
Functions managing the several directory names.
- noctua.utils.structure.date_folder()[source]
Create a date folder string based on astronomical convention (changes at midday UTC).
- noctua.utils.structure.fits_path(header, dry=False)[source]
Create a fits file path where the file will be stored
- noctua.utils.structure.foc_path(timestamp, dry=False)[source]
Create the focus output text file name and its path
- noctua.utils.structure.frame_folder(header)[source]
Create a folder depending on the image type in FITS header
noctua.utils.url_stuff module
Utilities related to URLs
Module contents
Utils