Commit 41f9ef6a4f7ccd05f915f0a3e2ec1b545d94fb63

Authored by Alexis Koralewski
1 parent 1244037f
Exists in dev

update Image save method (add sky_field indexes)

Showing 1 changed file with 5 additions and 0 deletions   Show diff stats
src/core/pyros_django/seq_submit/models.py
... ... @@ -585,6 +585,11 @@ class Image(models.Model):
585 585 file_out = img_obj.join(img_obj.fname)
586 586 naxis1 = img_obj.getkwd("NAXIS1")
587 587 naxis2 = img_obj.getkwd("NAXIS2")
  588 + sky_field = img_obj._wcs.wcs2skyfield(naxis1, naxis2)
  589 + self.coscrval1 = sky_field["coscrval"]
  590 + self.coscrval2 = sky_field["coscrval2"]
  591 + self.sincrval1 = sky_field["sincrval1"]
  592 + self.sincrval2 = sky_field["sincrval2"]
588 593 sky_field_as_json = json.dumps(img_obj._wcs.wcs2skyfield(naxis1, naxis2))
589 594 self.sky_field = sky_field_as_json
590 595 # Save as default, if save parameter is passed, save only if is True
... ...