Skip to content

Code for using/loading updated Hinode SOT-SP Pointing

License

Notifications You must be signed in to change notification settings

dfouhey/SOTSPPointing

Repository files navigation

SOTSPPointing

Code for using/loading updated Hinode SOT-SP Pointing, written by David Fouhey to accompany results from:

``Large-Scale Spatial Cross-Calibration of Hinode/SOT-SP and SDO/HMI'' by David F. Fouhey, Richard E.L. Higgins, Spiro K. Antiochos, Graham Barnes, Marc DeRosa, J. Todd Hoeksema, K.D. Leka, Yang Liu, Peter W. Schuck, Tamas I. Gombosi. ApJS 264 49, 2023.

Some of the pointing data, in particular for polar scans, is from an upcoming paper by Ruoyu Wang, Richard Higgins, David Fouhey, et al. (the et al. being most of the above).

This repository contains scripts that can work with and without an updated pointing information cache. This updated information can be found at: https://fouheylab.eecs.umich.edu/~fouhey/HinodeSOTSPLevel2Update.tgz . The updated pointing table that is included in the repository is likely the most important

There are three scripts in the repository. In order of likely usefulness, they are:

Scripts

minimalCorrect.py

This provides an easy, minimal piece of code that will make an estimate of what the updated pointing should be at a particular date. The code has close to no dependencies and should work with nearly any version of python. If the pointing has a known correction (i.e., it was fit), that is used. Otherwise, it makes a prediction for a correction that should be substantially better than the current pointing.

In both cases, the given output is a correction dx and dy that should be added to XCEN and YCEN.

For instance, here is the prediction at the time of writing:

> python minimalCorrect.py 20230608_232500
20230608_232500 23.438624 61.849458

In this case, one should add 23.43 arcseconds to XCEN and 61.8 arcseconds to YCEN.

If one fast forwards three months to outside Hinode eclipse season, the correction is different:

> python minimalCorrect.py 20230908_232500
20230908_232500 29.974904 36.725413

Here, one should only add 29.97 arcseconds to XCEN and 36.72 arcseconds to YCEN.

visualizePointingUpdate.py

This loads the updated pointing as well as a HMI field observation and makes pictures that show that the new pointing better aligns the data. You'll need to download hmi data from JSOC (http://jsoc.stanford.edu/ajax/exportdata.html) in order to use this script.

plotPointingUpdate.py

This script can take a folder full of SOT-SP Level 2 observations and the updated data and: (a) dump a table that shows pointing and updates for the shared observations; (b) fit models that predict the pointing update; (c) plot plots quickly verifying the pointing update models; (d) plot the update as a function of various properties. Since this script requires a complete set of SOT-SP observations, it's less likely of interest.

Pointing information

We provide an updated pointing data cache at : https://fouheylab.eecs.umich.edu/~fouhey/HinodeSOTSPLevel2Update.tgz as well a table of pointing updates in pointingTableSOTSP.txt.

pointingTableSOTSP.txt

This is a csv file containing all pointing information. The first two lines are:

datestr,XCENU,YCENU,XCENO,YCENO,DXCEN,DYCEN,totalTime,timeOfYear,timeOfDay,T_SPCCD,T_SPCEB
20061103_130310,-88.387131,-172.464481,-91.119888,-168.462860,2.732757,-4.001621,0.114015,0.839271,0.543866,-45.205000,-6.101200

The columns are:

  • (1) datestr: the nominal date of the Level2 Scan
  • (2) XCENU: the updated XCEN
  • (3) YCENU: the updated YCEN
  • (4) XCENO: the original XCEN. Notably, this is re-computed from the X_COORDINATE because the XCEN in the Level 2 header isn't always right
  • (5) YCENO: the original YCEN, computed like same as XCENO.
  • (6) DXCEN: the change in XCEN (XCENU - XCENO)
  • (7) DYCEN: the change in YCEN (YCENU - YCENO)
  • (8) totalTime: the time since Hinode Launch (in years)
  • (9) timeOfYear: the time of year (in years), i.e., Jan 1 is 0, July 1 is ~0.5, Dec 31 is 1
  • (10) timeOfDay: the time of day (in days), i.e., Midnight is 0, 06:00 is 0.25, 18:00 is 0.75, and 11:59 is 1
  • (11) T_SPCCD: the temperature at the CCD (i.e., camera chip), as reported in SOT-SP Level 1 data. This is pulled from a somewhat arbitrary level 1 scan that went into the Level 2 data.
  • (12) T_SPCEB: the temperature at the CEB, camera electronics box, as reported in SOT-SP Level 1 data.

The information for the pointing update comes from: co-alignment with SDO/HMI as well as confident co-alignments to SOHO/MDI.

Fits files for update

The pointing data tgz provides four groups of updated fits files. These are put in four groups that are of varying interest. They are as follows:

  • Main: primarily equatorial scans and based on co-alignment with SDO/HMI following Fouhey ApJS 2023
  • Pole: primarily polar scans and based on co-alignment with SDO/HMI following a forthcoming paper
  • MDIHighConfidence: primarily equatorial scans, based on co-alignment with SOHO/MDI. These are highly confident alignments and most ought to be correct.
  • MDILowConfidence: primarily equatorial scans, based on co-alignment with SOHO/MDI. These include less confident alignments, and these are a bit noisier.

Structure of each fits file

Each updated fits file is renamed identically to the old fits file. It has the same number of extensions. The only extensions that are filled with data are the 38 and 39th, which were X_COORDINATE and Y_COORDINATE respectively. The remaining fits data is dummy data, which is put in so that the same extension numbers for X coordinates and Y Coordinates are the same.

Here's an example loading a fits file (with some lines removed for brevity). The script visualizePointingUpdate.py shows how to use the fits file.

>>> import astropy.io.fits as fits
>>> import astropy.io.fits as fits
>>> X = fits.open("dataSample/update/20160913_084504.fits")
>>> X[0].header
SIMPLE  =                    T / conforms to FITS standard
BITPIX  =                    8 / array data type
NAXIS   =                    0 / number of array dimensions
EXTEND  =                    T
XCEN    =    238.6683197021484 / XCEN, updated
YCEN    =   -34.68552017211914 / YCEN, updated
XSCALE  =       0.295243459379 / XSCALE with scale correction
YSCALE  =      0.3162061153349 / YSCALE with scale correction
TSTART  = '2016-09-13T08:45:04.449'
TEND    = '2016-09-13T09:17:24.660'
...
SOLAR_RA=        953.222365844
WAVEUNIT=
T_SPCCD =             -45.1226 / L1 T_SPCCD: Temp at the CCD
T_SPCEB =             -7.04131 / L1 T_SPCEB: Temp at the Camera Electronics Box
L1DATE  = '2016-09-13T08:45:04.449' / Timestamp of data for Level 1 readings
PNTDATE = '20160913_090000'    / Timestamp of SDO/HMI data providing pointing
WARP00  =   0.5854634755371871 / Affine warp 0,0 entry; see comments
WARP01  = 0.003982504918422559 / Affine warp 0,1 entry; see comments
WARP02  =    2377.973547790906 / Affine warp 0,2 entry; see comments
WARP10  = -0.00371848763223202 / Affine warp 1,0 entry; see comments
WARP11  =   0.6270321166791303 / Affine warp 1,1 entry; see comments
WARP12  =    1818.135580985955 / Affine warp 1,2 entry; see comments
BNDMINX =                 2378 / Minimum X of warped region
BNDMINY =                 1817 / Minimum Y of warped region
BNDMAXX =                 2675 / Maximum X of warped region
BNDMAXY =                 2138 / Maximum Y of warped region
PACKDATE= '20230629'           / Date data was stored
COMMENT
COMMENT Pointing has been updated from SDO/MDI following
COMMENT Fouhey et al 2023 ApJS 264 49
COMMENT Important information on affine warp. The warp assumes:
COMMENT 1) Hinode/SOT-SP has been expanded using the slit position
COMMENT 2) X (left/right) is coordinate 1, Y (top/down) is coordinate 2
COMMENT 3) SDO/HMI has been flipped/rotated exactly 180 degrees
HISTORY
>>> X[38].data
array([[162.73302, 163.02829, 163.32355, ..., 313.02502, 313.32028, 313.61554],
       [162.73495, 163.03021, 163.32549, ..., 313.02695, 313.3222 , 313.6175 ],
       ...,
       [163.71913, 164.0144 , 164.30966, ..., 314.01114, 314.3064 , 314.60165],
       [163.72105, 164.01633, 164.3116 , ..., 314.01306, 314.30832, 314.6036 ]], dtype=float32)
>>> X[39].data
array([[-115.022995, -115.0248  , -115.0266  , ..., -115.94183 , -115.94364 , -115.94544 ],
       [-114.706764, -114.708565, -114.71037 , ..., -115.6256  , -115.6274  , -115.62921 ],
       ...,
       [  46.256313,   46.25451 ,   46.252705, ...,   45.33734 , 45.335537,   45.33373 ],
       [  46.572548,   46.570744,   46.56894 , ...,   45.653576, 45.651768,   45.649963]], dtype=float32)

About

Code for using/loading updated Hinode SOT-SP Pointing

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages