<p>It appears to me that the full Spizter frame should normally be 256x256 but, if observing a very bright source or when requiring high temporal resolution, a different observing mode is performed wherein only 32x32 pixels are read from the CCD. However, what happens is that the exposure times are short and a total of 64 frames are observed in total, creating a data cube of 64x32x32. If you want, you can treat each individial 32x32 frame as its own image, or else stack them all together for the full image.</p>

<p><a href="https://irsasupport.ipac.caltech.edu/index.php?/Knowledgebase/Article/View/118/0/what-is-different-about-taking-irac-data-with-the-subarray-mode-as-opposed-to-full-array-or-hdr-mode-and-what-are-the-main-differences-in-data-processing-and-data-products-for-irac-subarray" rel="nofollow">Full details can be found here.</a></p>

CC BY-SA 3.0
2016-03-10T19:06:27.413Z
If I am stacking, then I am looking at an array of size 32 x 32 with each element being an array of size 64 which has pixel intensities separated by 2secs. Is this correct?
gokul_uf
CC BY-SA 3.0
2016-03-10T19:08:31.690Z
You'd be looking at an array of 32x32, where each element is a single number representing the sum of the 64 corresponding pixels in each of the 64 frames. You want to add all 64 frames together, pixel by pixel to create a single 32x32 frame. That is, if you want the total frame. Its the same concept as taking images in different filters and adding them together.
zephyr
CC BY-SA 3.0
2016-03-10T19:10:36.710Z
forgive my ignorance, but aren't the images taken with the same "filter" but at different times? If so, how would adding them up make sense?
gokul_uf
CC BY-SA 3.0
2016-03-10T19:12:50.063Z
They are taken at different times with the same filter. Adding the images together makes sense if you want a full image that represents the extent of the 64 observations. If you only care about the snapshot image of your source, just use any one of the 32x32 frames, but if you're looking for say, a high S/N, you'll want to add all your 32x32 frames together.
zephyr
CC BY-SA 3.0
2016-03-10T19:19:03.540Z
Thanks! I am trying to plot a lightcurve, so I think my representation of a 3D array would be better suited for the task
gokul_uf
CC BY-SA 3.0
2016-03-10T18:53:51.653Z
2016-03-10T18:53:51.653Z
zephyr
<p>I am an amateur astronomer currently working on Spitzer telescope dataset with python (astropy and aplpy). From the examples in astropy's website, I understood that the FITS data is a way to represent image data with human-readable headers.  However, I now have a fits image ( SPITZER_I2_46469632_0000_0000_2_bcd.fits ) which is a 3D array of dimensions (64, 32, 32). I believe the second and third coordinates to be the length and height of the image in pixels. What about the first dimension? How do I interpret such images and <code>NaN</code>s in the data?</p>

CC BY-SA 3.0
2016-03-10T18:52:48.867Z
Are the data taken with the IRAC instrument? I'm no expert, but maybe your answer is here: [Subarray mode](https://irsasupport.ipac.caltech.edu/index.php?/Knowledgebase/Article/View/118/0/what-is-different-about-taking-irac-data-with-the-subarray-mode-as-opposed-to-full-array-or-hdr-mode-and-what-are-the-main-differences-in-data-processing-and-data-products-for-irac-subarray) and [Fowler sampling](http://irsa.ipac.caltech.edu/data/SPITZER/docs/irac/iracinstrumenthandbook/8/).
pela
CC BY-SA 3.0
2016-03-10T18:54:55.467Z
@pela You beat me to posting the link a second before I posted my answer!
zephyr
CC BY-SA 3.0
2016-03-10T19:04:55.570Z
@zephyr I don't know much about this, that's why I only posted it as a comment, but it seems correct, so +1 from me :)
pela
CC BY-SA 3.0
2016-03-10T19:08:01.727Z
@pela yup, I am using the IRAC instrument
gokul_uf
<exoplanet>
3D array in FITS data
gokul_uf
# 3D array in FITS data

(Asked by: username_0 on 2016-03-10)

I am an amateur astronomer currently working on Spitzer telescope dataset with python (astropy and aplpy). From the examples in astropy's website, I understood that the FITS data is a way to represent image data with human-readable headers. However, I now have a fits image ( SPITZER\_I2\_46469632\_0000\_0000\_2\_bcd.fits ) which is a 3D array of dimensions (64, 32, 32). I believe the second and third coordinates to be the length and height of the image in pixels. What about the first dimension? How do I interpret such images and `NaN`s in the data?

**Tags:** exoplanet
> **Comments:**
> **username_1**: Are the data taken with the IRAC instrument? I'm no expert, but maybe your answer is here: [Subarray mode](https://irsasupport.ipac.caltech.edu/index.php?/Knowledgebase/Article/View/118/0/what-is-different-about-taking-irac-data-with-the-subarray-mode-as-opposed-to-full-array-or-hdr-mode-and-what-are-the-main-differences-in-data-processing-and-data-products-for-irac-subarray) and [Fowler sampling](http://irsa.ipac.caltech.edu/data/SPITZER/docs/irac/iracinstrumenthandbook/8/).  
> **username_2**: @pela You beat me to posting the link a second before I posted my answer!  
> **username_1**: @zephyr I don't know much about this, that's why I only posted it as a comment, but it seems correct, so +1 from me :)  
> **username_0**: @pela yup, I am using the IRAC instrument  

---

## 1 answers

### Answer by username_2 on 2016-03-10. Score: 1 | Accepted answer

It appears to me that the full Spizter frame should normally be 256x256 but, if observing a very bright source or when requiring high temporal resolution, a different observing mode is performed wherein only 32x32 pixels are read from the CCD. However, what happens is that the exposure times are short and a total of 64 frames are observed in total, creating a data cube of 64x32x32. If you want, you can treat each individial 32x32 frame as its own image, or else stack them all together for the full image.

[Full details can be found here.](https://irsasupport.ipac.caltech.edu/index.php?/Knowledgebase/Article/View/118/0/what-is-different-about-taking-irac-data-with-the-subarray-mode-as-opposed-to-full-array-or-hdr-mode-and-what-are-the-main-differences-in-data-processing-and-data-products-for-irac-subarray)

> **Comments:**
> **username_0**: If I am stacking, then I am looking at an array of size 32 x 32 with each element being an array of size 64 which has pixel intensities separated by 2secs. Is this correct?  
> **username_2**: You'd be looking at an array of 32x32, where each element is a single number representing the sum of the 64 corresponding pixels in each of the 64 frames. You want to add all 64 frames together, pixel by pixel to create a single 32x32 frame. That is, if you want the total frame. Its the same concept as taking images in different filters and adding them together.  
> **username_0**: forgive my ignorance, but aren't the images taken with the same "filter" but at different times? If so, how would adding them up make sense?  
> **username_2**: They are taken at different times with the same filter. Adding the images together makes sense if you want a full image that represents the extent of the 64 observations. If you only care about the snapshot image of your source, just use any one of the 32x32 frames, but if you're looking for say, a high S/N, you'll want to add all your 32x32 frames together.  
> **username_0**: Thanks! I am trying to plot a lightcurve, so I think my representation of a 3D array would be better suited for the task  

---

