transform_to_catalog#

stellarphot.utils.transform_to_catalog(observed_mags_grouped, obs_filter, obs_mag_col='mag_inst', obs_error_column=None, cat_name='apass_dr9', cat_filter='r_mag', cat_color=('r_mag', 'i_mag'), a_delta=0.5, a_cen=0, b_delta=1e-06, c_delta=0.5, d_delta=1e-06, zero_point_range=(18, 22), in_place=True, fit_diff=True, verbose=True)[source]#

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

Parameters:
observed_magnitudes_groupedastropy.table.Table

An astropy table, grouped by whatever you want that separates the data into data from just one image and just one filter.

obs_mag_colstr

Name of the column in observed_magnitudes_grouped that contains instrumental magnitudes.

obs_filterstr

Name of the filter in which observations were done. Should be one of the names at https://www.aavso.org/filters

obs_error_columnstr, optional

Name of the column in observed_magnitudes_grouped that contains the error in the magnitude.

cat_filterstr

Name of the filter/passband in catalog that should be matched to the instrumental magnitudes.

cat_colortuple of two strings

Names of the two columns in the catalog that should be used to calculate color. The magnitude difference will be calculated in the order the filters are given. For example, if the value is ('r_mag', 'i_mag') then the calculated color will be the r_mag column minus the i_mag column.

a_delta, b_delta, c_delta, d_deltafloat, optional

Range allowed in fitting for each of the parameters a, b, c, and d. Use 1E-6 to fix a parameter.

a_cenfloat, optional

Center of range for the fitting parameter a.

zero_point_rangetuple of float, optional

Range to which the value of the zero point is restricted in fitting to observed magnitudes.

in_placebool, optional

If True, add the calibrated magnitude to the input table, otherwise return a copy.

fit_diffbool, optional

If True, fit the difference between the instrumental and catalog magnitude instead of the treating the catalog mag as the dependent variable.

verbose: bool optional

If True, print additional output.

Returns:
astropy.table.Table

Table containing the calibrated magnitudes and the fit parameters.