Skip to content

Commit

Permalink
add_field_stars_from_panstarrs: increase MAX_MAG_STD, sort (#156)
Browse files Browse the repository at this point in the history
  • Loading branch information
juanep97 authored Nov 21, 2024
1 parent 31e6dc0 commit bd61c0a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion iop4admin/modeladmins/astrosource.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ def add_field_stars_from_panstarrs(self, request, queryset):
# quality constraints
MIN_R_MAG = 11 # minimum R magnitude
MAX_R_MAG = 16 # maximum R magnitude
MAX_MAG_STD = 0.01 # maximum standard deviation in the required bands (we want our calibrators to be stable)
MAX_MAG_STD = 0.02 # maximum standard deviation in the required bands (we want our calibrators to be stable)
MIN_N_OBS = 5 # minimum number of observations in the required bands

logger.info(f"Querying PanSTARRS around {main_src.name} ({main_src.coord.ra.deg} {main_src.coord.dec.deg})")
Expand Down Expand Up @@ -165,6 +165,8 @@ def add_field_stars_from_panstarrs(self, request, queryset):
idx = idx & (catalog_data["yMeanApMagNpt"] > MIN_N_OBS)
catalog_data = catalog_data[idx]

catalog_data.sort(['rMeanApMagStd', 'rMeanApMagErr'])

catalog_data.remove_columns([col for col in catalog_data.columns if col not in column_names])

logger.info(f"Filtered down to {len(catalog_data)} PanSTARRS field stars with {MIN_R_MAG} <= R <= {MAX_R_MAG}, std < {MAX_MAG_STD} and n_obs > {MIN_N_OBS}")
Expand Down

0 comments on commit bd61c0a

Please sign in to comment.