<p>HEASARC keeps a <a href="https://fits.gsfc.nasa.gov/fits_viewer.html" rel="nofollow noreferrer">list of FITS viewers</a>.
Maybe one of those will meet your requirements.
Of course capabilities and usability vary widely.
<a href="https://heasarc.gsfc.nasa.gov/docs/software/ftools/fv/" rel="nofollow noreferrer">fv</a> did enough to help me answer another question here.</p>

<p>The <a href="https://archive.stsci.edu/missions/tess/doc/EXP-TESS-ARC-ICD-TM-0014.pdf" rel="nofollow noreferrer">TESS Science Data Products Description Document</a> gives a one-line description of each of their FITS header fields.
If Wikipedia and exploratory testing don't close the gaps, ask again here.</p>

CC BY-SA 3.0
2018-05-01T21:11:54.193Z
YEah I kinda realize that fits data can actually be a pretty complex data structure. I've never really worked with data structure that complex - so that's be my first area of exploration. I'll update things here when I make progress... thanks.
Francky_V
CC BY-SA 3.0
2018-05-01T20:21:26.647Z
2018-05-01T20:21:26.647Z
Mike G
<p>An insightful option is to open in a python IDE using <a href="http://docs.astropy.org/en/stable/io/fits/index.html" rel="nofollow noreferrer">Astropy</a>. I find it useful because you can manipulate the files as your learn their structure.</p>
<p>It is also possible to use matplotlib in conjunction with Astropy and then basically have a FITS file viewer that you can code yourself.</p>
<p>Something like:</p>
<pre><code>import astropy
import matplotlib.pyplot as plt
from astropy.visualization import astropy_mpl_style


    def open_fits_file(fits_path):
        for file in Path(fits_path).iterdir():

            with fits.open(file) as opened_fits:
                #printing header infos for that file
                opened_fits.info()
                plot_image(fits.getdata(file, ext=2))
</code></pre>
<p>Then to plot the image:</p>
<pre><code>def plot_image(fit_image_data):
    #astropy has better plot settings for this use
    plt.style.use(astropy_mpl_style)
    plt.figure()
    plt.imshow(fit_image_data, cmap=&quot;gray&quot;)
    plt.colorbar()
    plt.show()
</code></pre>
<p>I used that to plot the pixels  from these simulated data linked in the question.</p>
<p>As mentioned by Mike G, HEASARC as a list of viewer, including FV (fits viewer). It works fine and it has some built-in support to link up with other astronomy database. It has an apollo-era feel in terms of appearance, which is nice... I guess?</p>

CC BY-SA 4.0
2018-05-05T03:12:28.627Z
2021-12-14T02:55:25.710Z
2021-12-14T02:55:25.710Z
Francky_V
<p>I'm interested in trying to use the data that will be returned by TESS to apply some machine learning/computer sciences concepts. I'm not sure yet what I want to try to do with it (though I have some ideas - see end comments). This because I don't really understand the data structure it will be using. </p>

<p><strong><em>So essentially I would like to first some help to get a high-level view of how the TESS data is structured. Then a bit of guidance as to how I could visualize it/get started with some basic example</em></strong> </p>

<h2>Additional info/what I know at this point</h2>

<p>I've checked out <a href="https://archive.stsci.edu/tess/ete-6.html#ffi" rel="nofollow noreferrer">the MAST page</a>. It details what type of FITS documents will be returned.</p>

<p>I have downloaded samples of some of these data products and I see they all come in FITS format. On Ubuntu, you can open that in <a href="http://aladin.u-strasbg.fr/AladinDesktop/" rel="nofollow noreferrer">Aladin</a>. However Aladin in itself is a fairly involved piece of software. Do I need Aladin for this, or are there simple alternatives to just view the data quickly to help get a feel for what it means? In other words what kind of navigator do you use for FITS files?</p>

<p>I'm pretty new to astronomy - I'm coming at this rather from a computer science perspective. Some basic suggestions as to what kind of observation an amateur astronomer might want to look at would be welcomed if you have some.</p>

<p>The data linked above (MAST page) are <strong><em>simulated data</em></strong> (real data will only be available in a couple months). This is fine - mostly interested in being functional with the data when they arrive.</p>

<p>Data analysis ideas:</p>

<ul>
<li>Using kmeans or similar to try to extract  what are some of the "typical" <a href="http://spaceflight101.com/tess/tess-instrument/" rel="nofollow noreferrer">transit light curves</a>

<ul>
<li>Generating those transit light curves from the raw data, say from a target pixel</li>
</ul></li>
</ul>

CC BY-SA 3.0
2018-04-30T21:48:59.143Z
Learn python. There are lots of libraries to read and manipulate fits files.
ProfRob
CC BY-SA 3.0
2018-05-01T00:55:45.087Z
I'm actually good on that front - it's really more about getting started with the data...
Francky_V
CC BY-SA 3.0
2018-05-01T21:12:53.283Z
Although combining that comment with the other answer - I've been checking astropy which seems to be the best bet for that kind of data.
Francky_V
<data-analysis><tess>
Understanding expected TESS data structure
Francky_V
# Understanding expected TESS data structure

(Asked by: username_0 on 2018-04-30)

I'm interested in trying to use the data that will be returned by TESS to apply some machine learning/computer sciences concepts. I'm not sure yet what I want to try to do with it (though I have some ideas - see end comments). This because I don't really understand the data structure it will be using.

***So essentially I would like to first some help to get a high-level view of how the TESS data is structured. Then a bit of guidance as to how I could visualize it/get started with some basic example***

## Additional info/what I know at this point

I've checked out [the MAST page](https://archive.stsci.edu/tess/ete-6.html#ffi). It details what type of FITS documents will be returned.

I have downloaded samples of some of these data products and I see they all come in FITS format. On Ubuntu, you can open that in [Aladin](http://aladin.u-strasbg.fr/AladinDesktop/). However Aladin in itself is a fairly involved piece of software. Do I need Aladin for this, or are there simple alternatives to just view the data quickly to help get a feel for what it means? In other words what kind of navigator do you use for FITS files?

I'm pretty new to astronomy - I'm coming at this rather from a computer science perspective. Some basic suggestions as to what kind of observation an amateur astronomer might want to look at would be welcomed if you have some.

The data linked above (MAST page) are ***simulated data*** (real data will only be available in a couple months). This is fine - mostly interested in being functional with the data when they arrive.

Data analysis ideas:

* Using kmeans or similar to try to extract what are some of the "typical" [transit light curves](http://spaceflight101.com/tess/tess-instrument/)
  + Generating those transit light curves from the raw data, say from a target pixel

**Tags:** data-analysis, tess
> **Comments:**
> **username_1**: Learn python. There are lots of libraries to read and manipulate fits files.  
> **username_0**: I'm actually good on that front - it's really more about getting started with the data...  
> **username_0**: Although combining that comment with the other answer - I've been checking astropy which seems to be the best bet for that kind of data.  

---

## 2 answers

### Answer by username_0 on 2018-05-05. Score: 4 | Accepted answer

An insightful option is to open in a python IDE using Astropy. I find it useful because you can manipulate the files as your learn their structure.
It is also possible to use matplotlib in conjunction with Astropy and then basically have a FITS file viewer that you can code yourself.
Something like:
import astropy
import matplotlib.pyplot as plt
from astropy.visualization import astropy_mpl_style


    def open_fits_file(fits_path):
        for file in Path(fits_path).iterdir():

            with fits.open(file) as opened_fits:
                #printing header infos for that file
                opened_fits.info()
                plot_image(fits.getdata(file, ext=2))

Then to plot the image:
def plot_image(fit_image_data):
    #astropy has better plot settings for this use
    plt.style.use(astropy_mpl_style)
    plt.figure()
    plt.imshow(fit_image_data, cmap="gray")
    plt.colorbar()
    plt.show()

I used that to plot the pixels  from these simulated data linked in the question.
As mentioned by Mike G, HEASARC as a list of viewer, including FV (fits viewer). It works fine and it has some built-in support to link up with other astronomy database. It has an apollo-era feel in terms of appearance, which is nice... I guess?


---

### Answer by username_2 on 2018-05-01. Score: 2

HEASARC keeps a [list of FITS viewers](https://fits.gsfc.nasa.gov/fits_viewer.html).
Maybe one of those will meet your requirements.
Of course capabilities and usability vary widely.
[fv](https://heasarc.gsfc.nasa.gov/docs/software/ftools/fv/) did enough to help me answer another question here.

The [TESS Science Data Products Description Document](https://archive.stsci.edu/missions/tess/doc/EXP-TESS-ARC-ICD-TM-0014.pdf) gives a one-line description of each of their FITS header fields.
If Wikipedia and exploratory testing don't close the gaps, ask again here.

> **Comments:**
> **username_0**: YEah I kinda realize that fits data can actually be a pretty complex data structure. I've never really worked with data structure that complex - so that's be my first area of exploration. I'll update things here when I make progress... thanks.  

---

