photometry - Throughput measurement routines

Photometry routine

Contains python translation of Karl Gebhardt

class vdrp.photometry.ShuffleStar(starid='', shotid='', shuffleid=-1, ra=-1.0, dec=-1.0, u=99.0, g=99.0, r=99.0, i=99.0, z=99.0, catalog='None')[source]

Class to store the information about one star from the shuffle output

Attributes:
starid : int

ID for the star.

shotid : int

Shot number of the star observation

shuffleid : int

ID of the star in shuffle catalog

ra : float

Right ascension

dec : float

Declination

catalog : str

Catalog name used to find these.

u : float

U-Band magnitude from the shuffle catalog

g : float

G-Band magnitude from the shuffle catalog

r : float

R-Band magnitude from the shuffle catalog

i : float

I-Band magnitude from the shuffle catalog

z : float

Z-Band magnitude from the shuffle catalog

vdrp.photometry.extract_star_single_shot(ra, dec, starid, args, dithall=None)[source]

Equivalent of the rsp1a2b script.

Run the stellar extraction code for a given ra / dec position.

Parameters:
ra : float

Right Ascension of the star.

dec : float

Declination of the star.

starid : int

ID to give to the star / position

args : struct

The arguments structure

vdrp.photometry.getDefaults()[source]
vdrp.photometry.get_arguments(parser)[source]

Add command line arguments for the photometry routines, this function can be called from another tool.

Parameters:
parser : argparse.ArgumentParser
vdrp.photometry.get_g_band_throughput(args)[source]

Measure the throughput in the SDSS g-Band Equivalent of the rgettp0 script

Parameters:
args : struct

The arguments structure

vdrp.photometry.get_sedfits(starobs, args, wdir, nomove=False)[source]

Run quick_fit to generate the SED fits, if available.

If quick_fit cannot be imported, fall back to copying the files from sed_fit_dir

vdrp.photometry.get_shuffle_stars(nightshot, args, wdir)[source]

Rerun shuffle and find the all stars for a given night / shot.

Parameters:
nightshot : str

Night + shot name to work on.

args : argparse.Namespace

The script parameter namespace

vdrp.photometry.main(jobnum, args)[source]

Main function.

vdrp.photometry.mk_sed_throughput_curve(args)[source]

Equivalent of the rgett0b script.

Parameters:
args : struct

The arguments structure

vdrp.photometry.parseArgs(argv)[source]

Parses configuration file and command line arguments. Command line arguments overwrite configuration file settiongs which in turn overwrite default values.

Args:
args (argparse.Namespace): Return the populated namespace.
vdrp.photometry.run()[source]
vdrp.photometry.run_biwt(data, outfile, wdir)[source]

Calculate biweight of the supplied data.

Parameters:
data : list

List of the data to be run through biwt.

Returns:
n, biwt, error
vdrp.photometry.run_combsed(sedlist, sigmacut, rmscut, outfile, wdir, plotfile=None)[source]
Parameters:
sedlist : list

List of filenames of SED fits

sigmacut : float

Cut value for sigma

rmscut : float

Cut value for rms

outfile : str

Output filename

plotfile : str (optional)

Optional plot output filename

Returns:
n, biwt, error
vdrp.photometry.run_getsdss(filename, sdss_file, wdir)[source]

Run getsdss on filename. Equivalent to rsdss file.

Parameters:
filename : str

Filename with spectral data

sdss_file : str

Full path and filename to the sdss g-band filter curve.

Returns:
The flux in the g-Band.
vdrp.photometry.run_shuffle_photometry(args, wdir)[source]

Equivalent of the rsetstar script. Find all shuffle stars observed for the night / shot given on the command line, and the loop over all stars ra / dec.

Parameters:
args : struct

The arguments structure