Read raw data¶
Here, we introduce how to read raw data and draw a quick look interactive figure. In general, you can download the raw data by requesting to BBSO staff or SNU. The object frame has 3-dimension of (λ, y, x), When reading the data using fisspy it flip the data to (y, x, λ) to match up with the proc or comp data.
Now you can read the data using the fisspy.read.raw class:
import fisspy
fname = '~/Data/FISS/140603/sunspot/raw/FISS_20140603_170221_A.fts'
raw = fisspy.read.raw(fname)
You can check the data and header using the .data and .header attributes.
raw.data
array([[[5474, 5328, 5328, ..., 6467, 6501, 6451], [5509, 5273, 5274, ..., 6510, 6503, 6368], [5379, 5235, 5212, ..., 6497, 6486, 6359], ..., [5364, 5214, 5166, ..., 6824, 6792, 6730], [5394, 5208, 5179, ..., 6920, 6936, 6822], [5294, 5147, 5104, ..., 6574, 6593, 6483]], [[5572, 5444, 5354, ..., 6527, 6495, 6416], [5592, 5423, 5404, ..., 6522, 6534, 6421], [5501, 5345, 5312, ..., 6463, 6449, 6400], ..., [5434, 5278, 5247, ..., 6854, 6909, 6826], [5541, 5334, 5323, ..., 6998, 6973, 6888], [5373, 5203, 5146, ..., 6731, 6683, 6563]], [[5600, 5436, 5367, ..., 6528, 6513, 6390], [5611, 5451, 5389, ..., 6535, 6525, 6434], [5530, 5410, 5338, ..., 6400, 6494, 6351], ..., [5540, 5371, 5338, ..., 6943, 6916, 6823], [5577, 5408, 5395, ..., 7002, 7018, 6903], [5400, 5188, 5181, ..., 6677, 6771, 6646]], ..., [[5088, 5026, 4990, ..., 5661, 5642, 5585], [5128, 4999, 4977, ..., 5624, 5565, 5485], [5119, 4976, 4947, ..., 5647, 5659, 5558], ..., [5097, 4971, 4927, ..., 5843, 5819, 5761], [5107, 5000, 4947, ..., 5726, 5747, 5650], [5058, 4921, 4893, ..., 5854, 5797, 5806]], [[5148, 5017, 4942, ..., 5716, 5697, 5652], [5120, 5004, 4987, ..., 5619, 5643, 5508], [5076, 5004, 4980, ..., 5683, 5681, 5542], ..., [5078, 4929, 4946, ..., 5848, 5842, 5707], [5017, 4932, 4916, ..., 5751, 5755, 5657], [5001, 4869, 4860, ..., 5882, 5854, 5747]], [[5147, 5011, 4997, ..., 5853, 5838, 5663], [5078, 4927, 4956, ..., 5725, 5718, 5578], [5112, 4940, 4942, ..., 5747, 5696, 5581], ..., [4991, 4899, 4835, ..., 5852, 5811, 5683], [4957, 4777, 4817, ..., 5782, 5798, 5708], [4941, 4844, 4796, ..., 5885, 5868, 5754]]], dtype='>i2')
raw.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:02:21' / file creation date (YYYY-MM-DDThh:mm:ss UT) EXPTIME = 0.03 / Second HBINNING= 1 VBINNING= 2 GAIN = 0 / Value Range: 0-255 STRTIME = '2014.06.03-17:02:04' / Scan Start Time ENDTIME = '2014.06.03-17:02:21' / Scan Finish Time ELAPTIME= 17.33124 / Elapse Time During Scanning(Second) FISSMODE= 'Spectrograph' / FISS Mode STEPTIME= 130. / 1 Step Duration time(millisecond) STEPSIZE= 4.484155E-044 / 1 step size to move scanner(micrometer) CCDTEMP = -29 / 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
To draw the raw data using the interactive figure, you should change the matplotlib backend first:
%matplotlib
Then, you can simply draw the figure using the 'imshow' method:
raw.imshow()
/Users/jhkang/miniforge3/envs/fisspy115/lib/python3.9/site-packages/fisspy/image/interactive_image.py:112: UserWarning: FigureCanvasAgg is non-interactive, and thus cannot be shown helpFig.show() /Users/jhkang/miniforge3/envs/fisspy115/lib/python3.9/site-packages/fisspy/image/interactive_image.py:188: UserWarning: FigureCanvasAgg is non-interactive, and thus cannot be shown self.fig.show()
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 profile or raster image at a current mouse position. |
ctrl/cmd+b | Show the previous point. It is used to blink between two points. |
For details of the attributes and methods please see [fisspy.read.raw](http://fiss.snu.ac.kr/fisspy/read/raw/) document page.