The base class for the database access model. The initializer takes a set of keyword arguments defining the object. The model needs to be fully specified (i.e. all of the columns need to be provided (except for the id) otherwise, a ModelError is thrown.
Find a list of objects in the table that match a particular set of query parameters.
This is just a shortcut to run SELECT * FROM {{ table }} WHERE {{ q }}.
Parameters: |
|
---|---|
Returns: | A list of Model objects (or subclasses thereof) returned by the query. This will return an empty list if nothing was found. |
Takes the same arguments as find() but only returns a single result. This will return None if nothing matches the query.
Get the value of a given attribute.
Parameters: | k – The name of the attribute to get. |
---|
Upsert the object into the database.
Access objects in the runs table. This class is essentially a pointer to an calibration.data.SDSSRun object with a few database helpers. One entry corresponds to a (run, camcol) pair from the SDSS catalog. It has the following attributes:
Lazily access the interface to the HDF5 data file.
Returns: | A calibration.data.SDSSRun object pointing to the right data file. |
---|
Do the photometry for all of the stars in the run.
Find a list of objects in the table that match a particular set of query parameters.
This is just a shortcut to run SELECT * FROM {{ table }} WHERE {{ q }}.
Parameters: |
|
---|---|
Returns: | A list of Model objects (or subclasses thereof) returned by the query. This will return an empty list if nothing was found. |
Takes the same arguments as find() but only returns a single result. This will return None if nothing matches the query.
Get the value of a given attribute.
Parameters: | k – The name of the attribute to get. |
---|
Get all the stars within the “bounds” of this run as defined by ramin, ramax, decmin and decmax.
Returns: | The list of Star objects within the bounds of the run. |
---|
Find all of the runs that overlap with a given point.
Parameters: |
|
---|---|
Returns: | A list of Run objects returned by the query or None if nothing was found. |
Upsert the object into the database.
Access objects in the stars table. These are objects from the SDSS co-add catalog. This object and the associated table have the following attributes:
Find a list of objects in the table that match a particular set of query parameters.
This is just a shortcut to run SELECT * FROM {{ table }} WHERE {{ q }}.
Parameters: |
|
---|---|
Returns: | A list of Model objects (or subclasses thereof) returned by the query. This will return an empty list if nothing was found. |
Takes the same arguments as find() but only returns a single result. This will return None if nothing matches the query.
Get the value of a given attribute.
Parameters: | k – The name of the attribute to get. |
---|
Upsert the object into the database.
Access objects in the raw table. These objects are raw photometric measurements of point sources. The object as the following attributes:
Find a list of objects in the table that match a particular set of query parameters.
This is just a shortcut to run SELECT * FROM {{ table }} WHERE {{ q }}.
Parameters: |
|
---|---|
Returns: | A list of Model objects (or subclasses thereof) returned by the query. This will return an empty list if nothing was found. |
Takes the same arguments as find() but only returns a single result. This will return None if nothing matches the query.
Get the value of a given attribute.
Parameters: | k – The name of the attribute to get. |
---|
Measure the photometry of a particular star in a particular run.
Parameters: | |
---|---|
Returns: | The Measurement object. |
Upsert the object into the database.