models.py

This modules contains the django code used to create tables in the database backend.

class host.models.Acknowledgement(*args, **kwargs)[source]

Model to keep track of other work blast uses and relies on.

exception DoesNotExist
exception MultipleObjectsReturned
class host.models.Aperture(*args, **kwargs)[source]

Model to represent a sky aperture

exception DoesNotExist
exception MultipleObjectsReturned
property sky_aperture

Return photutils object

class host.models.AperturePhotometry(*args, **kwargs)[source]

Model to store the photometric data

exception DoesNotExist
exception MultipleObjectsReturned
class host.models.Catalog(*args, **kwargs)[source]

Model to represent a photometric catalog

exception DoesNotExist
exception MultipleObjectsReturned
class host.models.CatalogPhotometry(id, name, mag_column, mag_error_column, filter, catalog)[source]
exception DoesNotExist
exception MultipleObjectsReturned
class host.models.Cutout(*args, **kwargs)[source]

Model to represent a cutout image of a host galaxy

exception DoesNotExist
exception MultipleObjectsReturned
class host.models.ExternalRequest(*args, **kwargs)[source]

Keeps track of the frequency of requests to rate-limited external services

exception DoesNotExist
exception MultipleObjectsReturned
class host.models.ExternalResourceCall(*args, **kwargs)[source]

A model to represent a call to a call to an external resource.

resource_name

Name of the external resource.

Type:

models.CharField

response_status

Response status returned when the external resource was requested.

Type:

models.CharField

request_time

Time of request to the resource.

Type:

models.DateTimeField

exception DoesNotExist
exception MultipleObjectsReturned
class host.models.Filter(*args, **kwargs)[source]

Model to represent a survey filter

exception DoesNotExist
exception MultipleObjectsReturned
correlation_model()[source]

Returns the model for correlated errors of the filter, if it exists

transmission_curve()[source]

Returns the transmission curve of the filter

class host.models.Host(*args, **kwargs)[source]

Model to represent a host galaxy.

name

Name of the host galaxy, character limit = 20.

Type:

django.db.model.CharField

ra_deg

Right Ascension (ICRS) in decimal degrees of the host

Type:

django.db.model.FloatField

deg_deg

Declination (ICRS) in decimal degrees of the host

Type:

django.db.model.FloatField

exception DoesNotExist
exception MultipleObjectsReturned
class host.models.SEDFittingResult(*args, **kwargs)[source]

Model to store prospector results

exception DoesNotExist
exception MultipleObjectsReturned
class host.models.SkyObject(*args, **kwargs)[source]

Abstract base model to represent an astrophysical object with an on-sky position.

ra_deg

Right Ascension (ICRS) in decimal degrees of the host

Type:

django.db.model.FloatField

deg_deg

Declination (ICRS) in decimal degrees of the host

Type:

django.db.model.FloatField

property dec

String representation of Declination.

property ra

String representation of Right ascension.

property sky_coord

SkyCoordinate of the object’s position.

class host.models.StarFormationHistoryResult(id, transient, aperture, logsfr_16, logsfr_50, logsfr_84, logsfr_tmin, logsfr_tmax)[source]
exception DoesNotExist
exception MultipleObjectsReturned
class host.models.Status(*args, **kwargs)[source]

Status of a given processing task

exception DoesNotExist
exception MultipleObjectsReturned
property badge

Returns the Boostrap badge class of the status

class host.models.Survey(*args, **kwargs)[source]

Model to represent a survey

exception DoesNotExist
exception MultipleObjectsReturned
class host.models.Task(*args, **kwargs)[source]

A processing task that needs to be completed for a transient.

exception DoesNotExist
exception MultipleObjectsReturned
class host.models.TaskRegister(*args, **kwargs)[source]

Keep track of the the various processing status of a transient.

exception DoesNotExist
exception MultipleObjectsReturned
class host.models.TaskRegisterSnapshot(*args, **kwargs)[source]

Model to keep track of how many unprocessed transients exist

exception DoesNotExist
exception MultipleObjectsReturned
class host.models.Transient(*args, **kwargs)[source]

Model to represent a transient.

name

Transient Name Server name of the transient, character limit = 20.

Type:

django.db.model.CharField

tns_id

Transient Name Server ID.

Type:

models.IntegerField

tns_prefix

Transient Name Server name prefix, character limit = 20.

Type:

models.CharField

ra_deg

Right Ascension (ICRS) in decimal degrees of the transient.

Type:

django.db.model.FloatField

deg_deg

Declination (ICRS) in decimal degrees of the transient.

Type:

django.db.model.FloatField

host

ForeignKey pointing to a :class:Host representing a transient’s host galaxy.

Type:

django.db.model.ForeignKey

public_timestamp

Transient name server public timestamp for the transient. Field can be null or blank. On Delete is set to cascade.

Type:

django.db.model.DateTimeField

exception DoesNotExist
exception MultipleObjectsReturned
property best_redshift

get the best redshift for a transient

best_spec_redshift()[source]

get the best redshift for a transient

host.models.fits_file_path(instance)[source]

Constructs a file path for a fits image

host.models.hdf5_file_path(instance)[source]

Constructs a file path for a HDF5 image

host.models.npz_chains_file_path(instance)[source]

Constructs a file path for a npz file

host.models.npz_model_file_path(instance)[source]

Constructs a file path for a npz file

host.models.npz_percentiles_file_path(instance)[source]

Constructs a file path for a npz file