PolishookDavid / LAST_OCS

Code controling the LAST project Observatory
0 stars 0 forks source link

empty fields in Mount.pointingCorrection in absence of pointing model #19

Closed EastEriq closed 1 month ago

EastEriq commented 2 months ago

e.g., if

{obs.pointingModel} Expected configuration obs.pointingModel/obs.pointingModel.11_1.create.yml not found, using default values
...
>> Unit.Mount.PointingModel.InterpHA
ans = 
  scatteredInterpolant with properties:

                 Points: []
                 Values: []
                 Method: 'linear'
    ExtrapolationMethod: 'linear'

then

>> Unit.Mount.pointingCorrection
ans = 
  struct with fields:

         RA_App: []
         HA_App: []
        Dec_App: []
     RA_AppDist: 203.24
     HA_AppDist: 180
    Dec_AppDist: 30.184
        Alt_App: []
         Az_App: []
        AirMass: []
       RA_J2000: []
      Dec_J2000: []
       HA_J2000: []

and this causes many fields in the FITS header of the saved images to be blank strings, including some derived ones (e.g. offset telescopes pointing coordinates). I think that with an empty pointing model we should fill in all these values with the ones derived from the physical mount position, as best approximation.

The issue should be corrected inside celestial.convert.apparent_toJ2000. likely.

EastEriq commented 2 months ago

I pushed in a fix in AstroPack , but another possibility would have been to set as default Mount.PointingModel something which just evaluated as 0. I couldn't get it quickly right with scatteredinterpolant, so I went for the former.

EastEriq commented 1 month ago

Appears solved now (at least judging from written image headers), closing.