ytsapras / robonet_site

Django RoboNet operational database.
GNU General Public License v2.0
0 stars 0 forks source link

Verify Tmax set in full HJD date format in all cases #5

Closed rachel3834 closed 7 years ago

rachel3834 commented 7 years ago

Bug report from Yiannis:

Another problem we discovered today is that some SingleModel entries use the full JD 245xxxx for t0 and others do not, using the abbreviated form instead. The command to fix that in teh database is the following:

from django.db.models import F SingleModel.objects.filter(Tmax__lt=2450000.0).update(Tmax=F('Tmax')+2450000.0)

I have added a check in add_single_lens and add_binary_lens to catch these instances and commited it to github.

rachel3834 commented 7 years ago

OK, I think this has come up because some of the surveys provide full-format timestamps and some don't. Your fix should resolve the issue, so closing this for now.