Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add DB fields for polarization standards #162

Merged
merged 1 commit into from
Dec 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion iop4lib/db/astrosource.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,12 @@ class AstroSource(models.Model):

calibrates = models.ManyToManyField('AstroSource', related_name="calibrators", blank=True, help_text="sources that it calibrates (for calibrators only)")

p = models.FloatField(blank=True, null=True, help_text="Polarization degree [0-1] (for calibrators only)")
p_err = models.FloatField(blank=True, null=True, help_text="Polarization degree error (for calibrators only)")

chi = models.FloatField(blank=True, null=True, help_text="Polarization angle [deg] (for calibrators only)")
chi_err = models.FloatField(blank=True, null=True, help_text="Polarization angle error (for calibrators only)")

mag_R = models.FloatField(blank=True, null=True, help_text="Literature magnitude in R band (for calibrators only)")
mag_R_err = models.FloatField(blank=True, null=True, help_text="Literature magnitude error in R band (for calibrators only)")

Expand Down Expand Up @@ -199,7 +205,7 @@ def get_sources_in_field(cls, wcs=None, width=None, height=None, fit=None, qs=No
sources_in_field = list()

import warnings
for obj in qs:
for obj in qs.iterator():
try:
with warnings.catch_warnings():
warnings.simplefilter("ignore")
Expand Down
Loading