Read FISS data¶
Data format¶
There are two kinds of level 1 data: one is the processed data that has the filename of either '*1.fts', and the other is the compressed data that compresses the processed data using principle component analysis (PCA). The compressed data has two files one is the eigenvalue with the filename of '*_c.fts', and another is the eigenvector with the name of '*_p.fts'. To reconstruct the data, these two types of files should be in the same directory. Among these two, only the '*_c.fts' file will be used to read the data, and '*_p.fts' is used passively.
The table below summarizes these file types:
File types | Description |
---|---|
\*1.fts | Processed data. |
\*_c.fts | Eigenvalue of the compressed data (main file). |
\*_p.fts | Eigenvector of the compressed data (sub file). |
Read Data¶
Now, we are ready to read the FISS data. Here, we show how to handle the compressed data (*_c.fts), but you can also use the same method for the processed data (*1.fts).
To read the FISS data we use the fisspy.read.FISS module:
import fisspy
fname = './FISS_20140603_170841_A1_c.fts'
fiss = fisspy.read.FISS(fname)
You can read the data with the shape of (y,x,λ) and the header with the .data and .header attributes.
fiss.data
array([[[7116.11181641, 7123.06005859, 7115.08935547, ..., 7320.97900391, 7324.15869141, 7324.78466797], [7012.34667969, 7019.34082031, 7011.31054688, ..., 7343.17773438, 7347.43310547, 7347.41552734], [7006.23193359, 7010.51171875, 7003.09912109, ..., 7303.20996094, 7307.27441406, 7307.81689453], ..., [7113.49462891, 7114.36230469, 7106.13232422, ..., 7631.99072266, 7633.38232422, 7634.62695312], [7081.48779297, 7079.49414062, 7071.55175781, ..., 7578.56396484, 7580.08105469, 7581.52392578], [7092.57421875, 7091.46142578, 7084.03515625, ..., 7555.39111328, 7556.4609375 , 7557.59423828]], [[7212.64746094, 7219.09814453, 7212.01953125, ..., 7318.93017578, 7322.15234375, 7322.57910156], [7177.25439453, 7182.99804688, 7175.34472656, ..., 7355.71191406, 7359.23193359, 7358.66357422], [7132.80810547, 7136.59228516, 7129.38623047, ..., 7305.28417969, 7308.18945312, 7308.70263672], ..., [7065.79296875, 7068.30175781, 7061.06982422, ..., 7626.03173828, 7627.05859375, 7628.70166016], [7002.35253906, 7001.8515625 , 6994.52783203, ..., 7566.27490234, 7567.78955078, 7569.55566406], [7021.21875 , 7019.43994141, 7011.95996094, ..., 7562.21630859, 7562.36767578, 7564.67236328]], [[7241.15087891, 7247.05029297, 7240.47851562, ..., 7338.67822266, 7342.7109375 , 7344.18115234], [7252.63232422, 7260.09521484, 7254.09912109, ..., 7386.73681641, 7390.64990234, 7391.64257812], [7145.65332031, 7149.48144531, 7142.99072266, ..., 7308.43847656, 7312.24951172, 7313.49609375], ..., [7094.63623047, 7098.92919922, 7092.01708984, ..., 7681.48339844, 7682.96875 , 7683.60742188], [7028.58642578, 7030.24316406, 7022.75292969, ..., 7604.31152344, 7605.55322266, 7606.68066406], [6996.43945312, 6996.42529297, 6988.95947266, ..., 7573.12744141, 7574.19775391, 7576.15429688]], ..., [[7036.64746094, 7037.16259766, 7045.09570312, ..., 7229.30957031, 7226.89599609, 7229.54980469], [7000.76318359, 7002.78369141, 7009.23193359, ..., 7202.43261719, 7201.7109375 , 7205.59033203], [7006.60400391, 7008.78710938, 7016.1171875 , ..., 7234.43310547, 7235.27685547, 7237.71289062], ..., [6603.97363281, 6609.1796875 , 6610.92285156, ..., 7327.31054688, 7333.40332031, 7334.15429688], [6541.77783203, 6544.40917969, 6547.33496094, ..., 7202.00146484, 7209.82568359, 7210.59423828], [6540.33496094, 6544.27001953, 6547.78710938, ..., 7229.359375 , 7236.43798828, 7237.23681641]], [[7079.18994141, 7077.49755859, 7087.25634766, ..., 7243.95214844, 7239.84912109, 7244.13330078], [7030.85253906, 7030.89013672, 7039.74316406, ..., 7245.76025391, 7243.72070312, 7246.265625 ], [7021.67431641, 7020.08496094, 7029.73828125, ..., 7240.45605469, 7240.32617188, 7243.45214844], ..., [6570.17529297, 6572.94970703, 6575.56933594, ..., 7284.13818359, 7290.47460938, 7291.52783203], [6497.43798828, 6496.58496094, 6500.19921875, ..., 7155.86523438, 7164.11181641, 7165.36083984], [6497.15429688, 6496.859375 , 6500.12255859, ..., 7183.61523438, 7190.92382812, 7192.05371094]], [[7086.27539062, 7082.92919922, 7094.92382812, ..., 7241.73681641, 7237.0234375 , 7241.67333984], [7028.95214844, 7028.87646484, 7038.41113281, ..., 7264.92236328, 7261.62597656, 7265.14648438], [7034.25097656, 7032.36230469, 7043.29052734, ..., 7234.70996094, 7233.64794922, 7237.57373047], ..., [6573.10986328, 6576.46630859, 6578.87841797, ..., 7244.41894531, 7251.1875 , 7252.89599609], [6504.79052734, 6503.99560547, 6507.7421875 , ..., 7115.03808594, 7123.48291016, 7125.04638672], [6505.9453125 , 6503.875 , 6507.15429688, ..., 7143.95019531, 7151.77783203, 7153.34863281]]])
fiss.header
SIMPLE = T / file does conform to FITS standard BITPIX = 16 / number of bits per data pixel NAXIS = 3 / number of data axes NAXIS1 = 512 / length of data axis 1 NAXIS2 = 256 / length of data axis 2 NAXIS3 = 130 / length of data axis 3 DATE = '2014-06-03T17:08:41' / file creation date (YYYY-MM-DDThh:mm:s EXPTIME = 0.03 / Second HBINNING= 1 VBINNING= 2 GAIN = 0 / Value Range: 0-255 STRTIME = '2014.06.03-17:08:24' / Scan Start Time ENDTIME = '2014.06.03-17:08:41' / Scan Finish Time ELAPTIME= 17.33194 / Elapse Time During Scanning(Second) FISSMODE= 'Spectrograph' / FISS Mode STEPTIME= 130.0 / 1 Step Duration time(millisecond) STEPSIZE= 4.484155E-44 / 1 step size to move scanner(micrometer) CCDTEMP = -28 / Cooling Temperature of CCD CCDNAME = 'DV897_BV' / Productname of CCD WAVELEN = '6562.8 ' / CCD1 Wavenength(angstrom) CCD_XPIX= 512 / Full Pixel Size of X CCD_YPIX= 512 / Full Pixel Size of Y OBSERVER= 'Donguk Song' / The Name of Main Observer TARGET = 'Sunspot ' / Observation Target TEL_XPOS= 134 / X position of Telescope on the Sun TEL_YPOS= -318 / Y position of Telescope on the Sun CRPIX1 = 259.848724365 / pixel position of reference line center CDELT1 = 0.0191817938094 / angstrom per pixel CRVAL1 = 6562.817 / angstrom of reference line center HISTROY = 'processed by FISS_PREP' HISTORY dark+bias subtracted HISTORY flat-fieldded HISTORY -0.28 degree tilt corrected HISTORY displacement/distortion corrected
When you read the FISS data without any optional keyword, the wavelength will be calibrated using the information in the fits header. This calibration method always works, but it does not reflect the instrumental or time-varying shift of the line profile. Hence, we recommend recalibrating the wavelength using wvCalib with the method keyword of either 'center' or 'photo'.
fiss.wave = fiss.wvCalib(method='photo')
print(fiss.wave[250-5:250+5])
[6562.50901164 6562.52811525 6562.54721886 6562.56632247 6562.58542608 6562.60452969 6562.6236333 6562.64273691 6562.66184052 6562.68094413]
You can correct the stray light and line asymmetry using the 'corSLA' method.
fiss.corSLA()
You can smooth the spectral profile using the 'smoothingProf'.
fiss.smoothingProf()
If you want to reset the data, you can reload the data using the 'reload'.
fiss.reload
Now we draw the quick look interactive figure for the raster and spectral profile. For this we use '.imshow' method.
Note that if you run the interactive figure, you should change the matplotlib backend first:
%matplotlib
Using matplotlib backend: <object object at 0x0000025F4F9EF550>
fiss.imshow()
If you do not set the help box keyword to False, two figures will pop up: one is the main figure, and another is the help box for the interactive keys.
Following the help box figure or the below table for interactive keys, you can select or adjust the pixel point to change the raster image or profile.
Keys | Description |
---|---|
ctrl/cmd+h | Return to original setting position. |
right | Change the spectrograph and profile at the pixel of x+1. |
left | Change the spectrograph and profile at the pixel of x-1. |
up | Change the profile at the pixel of y+1. |
down | Change the profile at the pixel of y-1. |
ctrl/cmd+right | Show the raster image with λ+1. |
ctrl/cmd+left | Show the raster image with λ-1. |
spacebar | Show the raster image with λ-1. |
ctrl/cmd+b | Show the previous point. It is used to blink between two points. |
This module is combined with the lambdameter function, so you can easily draw the line-of-sight Doppler map, using the 'vshow' method.
fiss.vshow(hw=0.2)
fiss.chVclim(-5,5)
/Users/jhkang/miniforge3/envs/fisspydocs/lib/python3.9/site-packages/fisspy/read/read_factory.py:613: UserWarning: FigureCanvasAgg is non-interactive, and thus cannot be shown self.fig.show()
For details of the attributes and methods please see fisspy.read.FISS document page.