Reference/API#

All of the classes and functions defined in stellarphot are listed below, grouped by module.

stellarphot Package#

Functions#

apass_dr9(field_center[, radius, ...])

Return the items from APASS DR9 that are within the search radius and (optionally) within the field of view of a frame.

refcat2(field_center[, radius, ...])

Return the items from Refcat2 that are within the search radius and (optionally) within the field of view of a frame.

vsx_vizier(field_center[, radius, ...])

Return the items from the copy of VSX on Vizier that are within the search radius and (optionally) within the field of view of a frame.

Classes#

BaseEnhancedTable(*args[, input_data, ...])

A class to validate an astropy.table.QTable table of astronomical data during creation and store metadata as attributes.

CatalogData(*args[, input_data, ...])

A class to hold astronomical catalog data while performing validation to confirm the minimum required columns ('id', 'ra', 'dec', 'mag', and 'passband') are present and have the correct units.

PhotometryData(*args[, input_data, ...])

A modified astropy.table.QTable to hold reduced photometry data that provides the convenience of validating the data table is in the proper format including units.

SourceListData(*args[, input_data, colname_map])

A class to hold information on the source lists to pass to aperture photometry routines.

Class Inheritance Diagram#

Inheritance diagram of stellarphot.core.BaseEnhancedTable, stellarphot.core.CatalogData, stellarphot.core.PhotometryData, stellarphot.core.SourceListData

stellarphot.core Module#

Functions#

apass_dr9(field_center[, radius, ...])

Return the items from APASS DR9 that are within the search radius and (optionally) within the field of view of a frame.

refcat2(field_center[, radius, ...])

Return the items from Refcat2 that are within the search radius and (optionally) within the field of view of a frame.

vsx_vizier(field_center[, radius, ...])

Return the items from the copy of VSX on Vizier that are within the search radius and (optionally) within the field of view of a frame.

Classes#

BaseEnhancedTable(*args[, input_data, ...])

A class to validate an astropy.table.QTable table of astronomical data during creation and store metadata as attributes.

PhotometryData(*args[, input_data, ...])

A modified astropy.table.QTable to hold reduced photometry data that provides the convenience of validating the data table is in the proper format including units.

CatalogData(*args[, input_data, ...])

A class to hold astronomical catalog data while performing validation to confirm the minimum required columns ('id', 'ra', 'dec', 'mag', and 'passband') are present and have the correct units.

SourceListData(*args[, input_data, colname_map])

A class to hold information on the source lists to pass to aperture photometry routines.

Class Inheritance Diagram#

Inheritance diagram of stellarphot.core.BaseEnhancedTable, stellarphot.core.PhotometryData, stellarphot.core.CatalogData, stellarphot.core.SourceListData

stellarphot.differential_photometry Package#

Functions#

add_in_quadrature(array)

Add an array of numbers in quadrature.

add_relative_flux_column(...[, add_name, ...])

Add AIJ-style relative flux columns to a photometry data file.

calc_aij_relative_flux(star_data, comp_stars)

Calculate AstroImageJ-style flux ratios.

calc_multi_vmag(var_stars, star_data, ...)

Calculate the average magnitude and standard deviation of multiple variable stars in a field.

calc_vmag(var_stars, star_data, comp_stars)

Calculate the average magnitude and standard deviation of a variable star in field.

stellarphot.gui_tools Package#

Functions#

make_markers(iw, RD, vsx, ent[, name_or_coord])

Add markers for APASS, TESS targets, VSX.

set_keybindings(image_widget[, scroll_zoom])

Set image widget keyboard bindings.

wrap(imagewidget, outputwidget)

Utility function to let you click to select/deselect comparisons.

Classes#

ComparisonAndSeeing(**kwargs)

Combined viewer for seeing profile and comparison stars.

ComparisonViewer([file, directory, ...])

A class to store an instance of the comparison viewer.

SeeingProfileWidget([imagewidget, width, ...])

A class for storing an instance of a widget displaying the seeing profile of stars in an image.

TessAnalysisInputControls(**kwargs)

A class to hold the widgets for choosing TESS input

Class Inheritance Diagram#

Inheritance diagram of stellarphot.gui_tools.profile_and_comps.ComparisonAndSeeing, stellarphot.gui_tools.comparison_functions.ComparisonViewer, stellarphot.gui_tools.seeing_profile_functions.SeeingProfileWidget, stellarphot.gui_tools.photometry_widget_functions.TessAnalysisInputControls

stellarphot.io Package#

Functions#

generate_aij_table(table_name, comparison_table)

Generate an AIJ table from a stellarphot table and a comparison table.

parse_aij_table(table_name)

Return a list of objects, one for each source, from an AstroImageJ photometry table.

tess_photometry_setup([tic_id, TOI_object, ...])

Set up the photometry for a TESS target.

Classes#

ApertureAIJ()

Represents the aperture information AstroImageJ saves.

ApertureFileAIJ()

Class to represent AstroImageJ aperture file.

MultiApertureAIJ()

Multi-aperture information that AstroImageJ saves.

Star(table, id_num)

A class for storing photometry for a single star.

TOI(*, tic_id, coord, depth_ppt, ...)

Represent a TOI from the ExoFOP database.

TessSubmission(telescope_code, filter, ...)

A data class to represent TESS submissions.

TessTargetFile(coord, magnitude, depth[, file])

A class to hold information about a TESS target file.

Class Inheritance Diagram#

Inheritance diagram of stellarphot.io.aij.ApertureAIJ, stellarphot.io.aij.ApertureFileAIJ, stellarphot.io.aij.MultiApertureAIJ, stellarphot.io.aij.Star, stellarphot.io.tess.TOI, stellarphot.io.tess.TessSubmission, stellarphot.io.tess.TessTargetFile

stellarphot.photometry.photometry Module#

Functions#

single_image_photometry(ccd_image, ...[, ...])

Perform aperture photometry on a single image, with an options for estimating the local background from sigma clipped stats of the counts in an annulus around the aperture.

multi_image_photometry(...[, ...])

Perform aperture photometry on a directory of images.

find_too_close(sourcelist, aperture_rad[, ...])

Identify sources that are closer together than twice the aperture radius.

clipped_sky_per_pix_stats(data, annulus[, ...])

Calculate sigma-clipped statistics on an annulus.

calculate_noise([camera, counts, ...])

Computes the noise in a photometric measurement.

Classes#

AperturePhotometry(*, settings)

Class to perform aperture photometry on one or more images

Class Inheritance Diagram#

Inheritance diagram of stellarphot.photometry.photometry.AperturePhotometry

stellarphot.photometry.source_detection Module#

Functions#

source_detection(ccd[, fwhm, sigma, iters, ...])

Returns an SourceListData object containing the position of sources within the image identified using photutils.DAOStarFinder algorithm.

compute_fwhm(ccd, sources[, fwhm_estimate, ...])

Computes the FWHM in both x and y directions of sources in an image.

fast_fwhm_from_image(ccd, fwhm_estimate[, ...])

Compute the FWHM of a CCD image by block reducing it, running source detection on the reduced image, and then computing the FWHM of the detected sources in the original image.

stellarphot.plotting Package#

Functions#

bin_data(data_set[, num, error_set])

Bins data into groups of num.

multi_night(sources, unique_nights, night, ...)

Plot magnitude vs time data for several sources over several nights.

plot_magnitudes([mags, errors, times, ...])

Plot one night of magnitude data for one source, overlaying a rolling mean and indication of mean/deviation.

plot_many_factors(photometry, shift, scale)

Plots many factors of photometry against each other.

plot_transit_lightcurve(photometry, mod, ...)

scale_and_shift(data_set, scale, shift[, pos])

Scales and shifts data set passed in.

seeing_plot(raw_radius, raw_counts, ...[, ...])

Show a seeing plot for data from an image with radius on the x axis and counts (ADU) on the y axis.

stellarphot.transit_fitting Package#

Classes#

TransitModelFit()

Transit model fits to observed light curves.

TransitModelOptions(*[, bin_size, ...])

Create a new model by parsing and validating input data from keyword arguments.

VariableArgsFitter()

A callable class that can be used to fit functions with arbitrary number of positional parameters.

Class Inheritance Diagram#

Inheritance diagram of stellarphot.transit_fitting.core.TransitModelFit, stellarphot.transit_fitting.core.TransitModelOptions, stellarphot.transit_fitting.core.VariableArgsFitter

stellarphot.transit_fitting.gui Module#

Functions#

make_checker(indicator_widget, value_widget)

Build an observer that checks TIC number and, if it is a valid TIC number, looks up information about the TIC object from MAST copy of TIC as priors for EXOTIC.

validate_exposure_time(indicator_widget, ...)

Validates the exposure time input.

populate_TIC_boxes(tic_info, value_widget)

Set the appropriate widget values given information pulled from MAST TIC.

populate_TOI_boxes(toi, exotic_widget)

Set the appropriate widget values given information pulled from TESS Target of Interest (TOI) list.

exotic_settings_widget()

Generate a widget to enter (and store) settings for exotic.

set_values_from_json_file(widget, json_file)

Set values in EXOTIC widget from a JSON file of those settings.

get_values_from_widget(exotic_widget[, key])

Extract EXOTIC settings from widget.

generate_json_file_name(exotic_widget[, key])

Generate settings file name from user input.

Classes#

MyValid(**kwargs)

A class containing a more compact indicator of valid entries based on ipywidgets button value.

Class Inheritance Diagram#

Inheritance diagram of stellarphot.transit_fitting.gui.MyValid

stellarphot.transit_fitting.io Module#

Functions#

get_tic_info(TIC_ID)

Get the information about this TIC ID from the TESS Input Catalog at MAST.

stellarphot.transit_fitting.plotting Module#

Functions#

plot_predict_ingress_egress(ingress_time, ...)

Plot vertical lines at the ingress and egress times and label them.

stellarphot.utils Package#

Functions#

calc_residual(new_cal, catalog)

Calculate the standard deviations of the residuals between the new calibrated magnitude and the catalog magnitude.

calculate_transform_coefficients(input_mag, ...)

Calculate linear transform coefficients from input magnitudes to catalog magnitudes.

calibrated_from_instrumental(X, a, b, c, d, z)

Calculate the calibrated magnitudes from the instrumental magnitudes and colors.

crossmatch_APASS2VSX(CCD, RD, vsx)

Find APASS stars in FOV and matches APASS stars to VSX and APASS to input targets.

filter_transform(mag_data, output_filter[, ...])

Transform SDSS magnitudes to BVRI using either the transforms from Jester et al or Ivezic et al.

in_field(apass_good_coord, ccd, apass, ...)

Return APASS stars in the field of view.

mag_scale(cmag, apass, v_angle, RD_angle[, ...])

Select comparison stars that are 1) not close the VSX stars or to other target stars and 2) fall within a particular magnitude range.

opts_to_str(opts)

Convert the options from a fit to a string.

read_file(radec_file)

Read an AIJ radec file with target and/or comparison positions

set_up(ccd)

Read in sample image and find known variables in the field of view.

transform_magnitudes(input_mags, catalog, ...)

Calculate catalog magnitudes and transform coefficients from instrumental magnitudes.

transform_to_catalog(observed_mags_grouped, ...)

Transform a set of instrumental magnitudes to a standard system using either instrumental colors or catalog colors.