Commit 493681b9 authored by PAduverne's avatar PAduverne
Browse files

Fixed some minors bugs, add some lines to enable the photometry without the...

Fixed some minors bugs, add some lines to enable the photometry without the subtraction, improved the finding of the reference star in the photometry tables
parent bbf90c3c
......@@ -894,14 +894,20 @@ def calibration(source, catalog, cata_phot_syst, stars, wcs_data,
coord_sources = source_coordinates(source)
crossmatch = xmatch(coord_sources, catalog, 5.0)
source = joining(source, crossmatch)
star = get_source(source, stars, wcs_data)
source = cleaning_crossmatch(catalog, source)
if cata_phot_syst not in image_phot_syst:
change_photometric_system(image_phot_syst,
cata_phot_syst,
band, source)
change_photometric_system(image_phot_syst,
cata_phot_syst,
band, star)
else:
source['error'] = source['e_'+band]
star = get_source(source, stars, wcs_data)
source['error'] = source['e_'+ band]
star['error'] = star['e_'+ band]
if cut_mag!=0:
mask_magnitude = (source[band] < cut_mag)
source = source[mask_magnitude]
......@@ -915,9 +921,9 @@ def calibration(source, catalog, cata_phot_syst, stars, wcs_data,
1, cov=True)
source['Calibrated_Mag'] = pl.polyval(source['Magnitude'],
np.flip(coefs))
source['error magnitude'] = source['Calibrated_Mag'] - source[band]
da_2, db_2 = V[0,0], V[1,1]
star['Calibrated_Mag'] = pl.polyval(star['Magnitude'],
np.flip(coefs))
return source, coefs, da_2, db_2, star
def from_Vega2AB(band, mag_table):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment