From 2608c527a8085c5b50d5d24d7f6559278fadf471 Mon Sep 17 00:00:00 2001 From: Matt Craig Date: Wed, 22 Nov 2023 10:02:56 -0600 Subject: [PATCH] Use PhotometryData in tests --- stellarphot/differential_photometry/aij_rel_fluxes.py | 7 ++++--- .../differential_photometry/tests/test_aij_rel_fluxes.py | 2 ++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/stellarphot/differential_photometry/aij_rel_fluxes.py b/stellarphot/differential_photometry/aij_rel_fluxes.py index 84d512bf..bf4f8dfd 100644 --- a/stellarphot/differential_photometry/aij_rel_fluxes.py +++ b/stellarphot/differential_photometry/aij_rel_fluxes.py @@ -6,6 +6,7 @@ __all__ = ['add_in_quadrature', 'calc_aij_relative_flux'] + def add_in_quadrature(array): """ Add an array of numbers in quadrature. @@ -23,8 +24,8 @@ def calc_aij_relative_flux(star_data, comp_stars, Parameters ---------- - star_data : '~astropy.table.Table' - Table of star data from one or more images. + star_data : 'stellarphot.PhotometryDat' + Photometry data from one or more images. comp_stars : '~astropy.table.Table' Table of comparison stars in the field. Must contain a column @@ -56,7 +57,7 @@ def calc_aij_relative_flux(star_data, comp_stars, Returns ------- - `astropy.table.Table` or None + `stellarphot.PhotometryData` or None The return type depends on the value of ``in_place``. If it is ``False``, then the new columns are returned as a separate table, otherwise the columns are simply added to the input table. diff --git a/stellarphot/differential_photometry/tests/test_aij_rel_fluxes.py b/stellarphot/differential_photometry/tests/test_aij_rel_fluxes.py index f7fe5423..d45e00b7 100644 --- a/stellarphot/differential_photometry/tests/test_aij_rel_fluxes.py +++ b/stellarphot/differential_photometry/tests/test_aij_rel_fluxes.py @@ -7,6 +7,7 @@ from astropy.time import Time import astropy.units as u +from stellarphot import PhotometryData from stellarphot.differential_photometry.aij_rel_fluxes import calc_aij_relative_flux @@ -54,6 +55,7 @@ def _raw_photometry_table(): names=['date-obs', 'ra', 'dec', 'aperture_net_cnts', 'noise_electrons', 'star_id']) + photom = PhotometryData(raw_table) return expected_flux_ratios, expected_flux_error, raw_table, raw_table[1:4]