<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p>There are some good suggestions in this thread. If you do in fact need to serialize your data to disk and if you're not tied to FITS for other reasons, you might consider using the Advanced Scientific Data Format (ASDF) which is designed specifically for
 this purpose. Here's an example of how to use ASDF to store the data set you described:</p>
<p><br>
</p>
<p><span style="font-size: 10pt;">>>> import asdf</span></p>
<p><span style="font-size: 10pt;">>>> import numpy as np</span></p>
<p><span style="font-size: 10pt;"><br>
</span></p>
<p><font size="2"><span style="font-size:10pt;">>>> data = {'D1': np.linspace( 0, 100, 8*4,).reshape(8, 4),
<br>
</span></font></p>
<p><font size="2"><span style="font-size:10pt;">                  'D2': np.linspace( 0, 100, 10*5, ).reshape(10, 5),<br>
                   'ND': {'D1': np.linspace( 0, 100, 10*5,).reshape(10, 5),</span></font></p>
<p><font size="2"><span style="font-size:10pt;">                             'D2': np.linspace( 0, 100, 8*4,).reshape(8, 4), }}}</span></font></p>
<p><font size="2"><span style="font-size:10pt;"><br>
</span></font></p>
<p><font size="2"><span style="font-size:10pt;"># Writing data to file on disk<br>
</span></font></p>
<p><font size="2"><span style="font-size:10pt;">>>> outfile = asdf.AsdfFile(data)</span></font></p>
<p><font size="2"><span style="font-size:10pt;">>>> outfile.write_to('data.asdf')</span></font></p>
<p><font size="2"><span style="font-size:10pt;"><br>
</span></font></p>
<p><font size="2"><span style="font-size:10pt;"># Reading data from file on disk</span></font></p>
<p><font size="2"><span style="font-size:10pt;"></span></font><span style="font-size: 10pt;">>>> infile = asdf.open('data.asdf')</span></p>
<p><span style="font-size: 10pt;">>>> infile.tree</span></p>
<p><span style="font-size: 10pt;"></span><span style="font-size: 10pt;">{'D1': <array (unloaded) shape: [8, 4] dtype: float64>,</span><br>
</p>
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p></p>
<div><span style="font-size: 10pt;"> 'D2': <array (unloaded) shape: [10, 5] dtype: float64>,</span><br>
<span style="font-size: 10pt;"> 'ND': {'D1': <array (unloaded) shape: [10, 5] dtype: float64>,</span><span style="font-size: 10pt;">  'D2': <array (unloaded) shape: [8, 4] dtype: float64>}}<br>
# Data arrays can be accessed hierarchically from the top-level tree:<br>
>>> infile.tree['D1']<br>
</span><span style="font-size: 10pt;">array([[   0.        ,    3.22580645,    6.4516129 ,    9.67741935],</span><br>
<span style="font-size: 10pt;">
<div><span style="font-size: 10pt;">       [  12.90322581,   16.12903226,   19.35483871,   22.58064516],</span><br>
<span style="font-size: 10pt;">       [  25.80645161,   29.03225806,   32.25806452,   35.48387097],</span><br>
<span style="font-size: 10pt;">       [  38.70967742,   41.93548387,   45.16129032,   48.38709677],</span><br>
<span style="font-size: 10pt;">       [  51.61290323,   54.83870968,   58.06451613,   61.29032258],</span><br>
<span style="font-size: 10pt;">       [  64.51612903,   67.74193548,   70.96774194,   74.19354839],</span><br>
<span style="font-size: 10pt;">       [  77.41935484,   80.64516129,   83.87096774,   87.09677419],</span><br>
<span style="font-size: 10pt;">       [  90.32258065,   93.5483871 ,   96.77419355,  100.        ]])<br>
>>> infile.tree['ND']<br>
<div>{'D1': <array (unloaded) shape: [10, 5] dtype: float64>,<br>
 'D2': <array (unloaded) shape: [8, 4] dtype: float64>}<br>
</div>
<br>
</span></div>
</span>The metadata contents of the ASDF file are human-readable:<br>
<br>
<div><span style="font-size: 10pt;">#ASDF 1.0.0</span><br>
<span style="font-size: 10pt;">#ASDF_STANDARD 1.1.0</span><br>
<span style="font-size: 10pt;">%YAML 1.1</span><br>
<span style="font-size: 10pt;">%TAG ! tag:stsci.edu:asdf/</span><br>
<span style="font-size: 10pt;">--- !core/asdf-1.0.0</span><br>
<span style="font-size: 10pt;">D1: !core/ndarray-1.0.0</span><br>
<span style="font-size: 10pt;">  source: 0</span><br>
<span style="font-size: 10pt;">  datatype: float64</span><br>
<span style="font-size: 10pt;">  byteorder: little</span><br>
<span style="font-size: 10pt;">  shape: [8, 4]</span><br>
<span style="font-size: 10pt;">D2: !core/ndarray-1.0.0</span><br>
<span style="font-size: 10pt;">  source: 1</span><br>
<span style="font-size: 10pt;">  datatype: float64</span><br>
<span style="font-size: 10pt;">  byteorder: little</span><br>
<span style="font-size: 10pt;">  shape: [10, 5]</span><br>
<span style="font-size: 10pt;">ND:</span><br>
<span style="font-size: 10pt;">  D1: !core/ndarray-1.0.0</span><br>
<span style="font-size: 10pt;">    source: 2</span><br>
<span style="font-size: 10pt;">    datatype: float64</span><br>
<span style="font-size: 10pt;">    byteorder: little</span><br>
<span style="font-size: 10pt;">    shape: [10, 5]</span><br>
<span style="font-size: 10pt;">  D2: !core/ndarray-1.0.0</span><br>
<span style="font-size: 10pt;">    source: 3</span><br>
<span style="font-size: 10pt;">    datatype: float64</span><br>
<span style="font-size: 10pt;">    byteorder: little</span><br>
<span style="font-size: 10pt;">    shape: [8, 4]</span><br>
<span style="font-size: 10pt;">asdf_library: !core/software-1.0.0 {author: Space Telescope Science Institute, homepage: 'http://github.com/spacetelescope/asdf',</span><br>
<span style="font-size: 10pt;">  name: asdf, version: 1.3.2.dev1044}</span><br>
</div>
<br>
The data arrays themselves are stored efficiently, and can even be compressed.<br>
<br>
ASDF is also capable of serializing various types from Astropy including tables, Time objects, units and quantities, and some transforms and coordinates.<br>
<br>
ASDF can be installed using pip:<br>
$ pip install asdf<br>
<br>
</div>
Basic documentation can be found here:
<p></p>
<p><a href="http://asdf.readthedocs.io/en/latest/" class="OWAAutoLink" id="LPlnk588682" previewremoved="true">http://asdf.readthedocs.io/en/latest/</a></p>
<p><br>
</p>
<p>If you have any questions feel free to open an issue in our  github repo:</p>
<p><a href="https://github.com/spacetelescope/asdf" class="OWAAutoLink" id="LPlnk755894" previewremoved="true">https://github.com/spacetelescope/asdf</a></p>
<div id="LPBorder_GT_15124276423160.2715442764765956" style="margin-bottom: 20px; overflow: auto; width: 100%; text-indent: 0px;">
<table id="LPContainer_15124276423020.07317479847020159" style="width: 90%; background-color: rgb(255, 255, 255); position: relative; overflow: auto; padding-top: 20px; padding-bottom: 20px; margin-top: 20px; border-top: 1px dotted rgb(200, 200, 200); border-bottom: 1px dotted rgb(200, 200, 200);" role="presentation" cellspacing="0">
<tbody>
<tr style="border-spacing: 0px;" valign="top">
<td id="ImageCell_15124276423040.3237917091682009" style="width: 250px; position: relative; display: table-cell; padding-right: 20px;" colspan="1">
<div id="LPImageContainer_15124276423040.43624046735870015" style="background-color: rgb(255, 255, 255); height: 250px; position: relative; margin: auto; display: table; width: 250px;">
<a id="LPImageAnchor_15124276423080.3952042705007045" style="display: table-cell; text-align: center;" href="https://github.com/spacetelescope/asdf" target="_blank"><img style="display: inline-block; max-width: 250px; max-height: 250px; height: 250px; width: 250px; border-width: 0px; vertical-align: bottom;" aria-label="Preview image with link selected. Double-tap to open the link." id="LPThumbnailImageID_15124276423080.10384976371431465" width="250" height="250" src="https://avatars0.githubusercontent.com/u/2751928?s=400&v=4"></a></div>
</td>
<td id="TextCell_15124276423100.9823810380017982" style="vertical-align: top; position: relative; padding: 0px; display: table-cell;" colspan="2">
<div id="LPRemovePreviewContainer_15124276423100.907872957859377"></div>
<div id="LPTitle_15124276423100.7300773510815363" style="top: 0px; color: rgb(0, 120, 215); font-weight: 400; font-size: 21px; font-family: "wf_segoe-ui_light","Segoe UI Light","Segoe WP Light","Segoe UI","Segoe WP",Tahoma,Arial,sans-serif; line-height: 21px;">
<a id="LPUrlAnchor_15124276423110.9259348708174314" style="text-decoration: none;" href="https://github.com/spacetelescope/asdf" target="_blank">GitHub - spacetelescope/asdf: ASDF (Advanced Scientific Data Format) is a next generation interchange format for
 scientific data</a></div>
<div id="LPMetadata_15124276423120.4710590654344107" style="margin: 10px 0px 16px; color: rgb(102, 102, 102); font-weight: 400; font-family: "wf_segoe-ui_normal","Segoe UI","Segoe WP",Tahoma,Arial,sans-serif; font-size: 14px; line-height: 14px;">
github.com</div>
<div id="LPDescription_15124276423140.9032636611309196" style="display: block; color: rgb(102, 102, 102); font-weight: 400; font-family: "wf_segoe-ui_normal","Segoe UI","Segoe WP",Tahoma,Arial,sans-serif; font-size: 14px; line-height: 20px; max-height: 100px; overflow: hidden;">
asdf - ASDF (Advanced Scientific Data Format) is a next generation interchange format for scientific data</div>
</td>
</tr>
</tbody>
</table>
</div>
<br>
<p></p>
<br>
<br>
<div style="color: rgb(0, 0, 0);">
<div>
<hr style="display:inline-block; width:98%" tabindex="-1">
<div id="x_divRplyFwdMsg" dir="ltr"><font style="font-size:11pt" color="#000000" face="Calibri, sans-serif"><b>From:</b> AstroPy <astropy-bounces+ddavella=stsci.edu@python.org> on behalf of astropy-request@python.org <astropy-request@python.org><br>
<b>Sent:</b> Monday, December 4, 2017 4:51 PM<br>
<b>To:</b> astropy@python.org<br>
<b>Subject:</b> AstroPy Digest, Vol 135, Issue 2</font>
<div> </div>
</div>
</div>
<font size="2"><span style="font-size:10pt;">
<div class="PlainText">Send AstroPy mailing list submissions to<br>
        astropy@python.org<br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
        <a href="https://mail.python.org/mailman/listinfo/astropy" id="LPlnk241080" previewremoved="true">
https://mail.python.org/mailman/listinfo/astropy</a><br>
or, via email, send a message with subject or body 'help' to<br>
        astropy-request@python.org<br>
<br>
You can reach the person managing the list at<br>
        astropy-owner@python.org<br>
<br>
When replying, please edit your Subject line so it is more specific<br>
than "Re: Contents of AstroPy digest..."<br>
<br>
<br>
Today's Topics:<br>
<br>
   1. Re: Nested recarrays in FITS (Paul Kuin)<br>
   2. Re: Nested recarrays in FITS (Peter Teuben)<br>
<br>
<br>
----------------------------------------------------------------------<br>
<br>
Message: 1<br>
Date: Mon, 4 Dec 2017 21:08:04 +0000<br>
From: Paul Kuin <npkuin@gmail.com><br>
To: Astronomical Python mailing list <astropy@python.org><br>
Cc: Daniel Sela <danielsela42@gmail.com><br>
Subject: Re: [AstroPy] Nested recarrays in FITS<br>
Message-ID:<br>
        <CANoQ6N3gCT1Ek91-VMgzxYc4z4+UuiK3gMu1HwigpdnKn-oxBg@mail.gmail.com><br>
Content-Type: text/plain; charset="utf-8"<br>
<br>
I think that HDF does that for you. FIts is more flexible, but you have to<br>
do your own writes and retrievals. In the end you will be reinventing the<br>
wheel unless you check out how HDF does it, That's my opinion.<br>
<br>
Cheers,<br>
<br>
   Paul<br>
<br>
On Mon, Dec 4, 2017 at 9:02 PM, Arnon Sela <arnon.sela@gmail.com> wrote:<br>
<br>
> Dear Whom that Can Help,<br>
><br>
> I have nested numpy recarray structure to be stored into Fits.<br>
> The following code is a just a test I used to build a nested structure<br>
> (data_for_fits variable in the last line of the code).<br>
><br>
> Code start >>>>>><br>
><br>
> import numpy as np<br>
><br>
> ''' The following two functions are adapted from:<br>
> adopted from <a href="https://stackoverflow.com/questions/32328889/numpy-" id="LPlnk377628" previewremoved="true">
https://stackoverflow.com/questions/32328889/numpy-</a><br>
> structured-array-from-arbitrary-level-nested-dictionary<br>
> '''<br>
><br>
> def mkdtype(d):<br>
>     ''' Creates dtype for nested dictionary with numpy based type objects<br>
>     '''<br>
>     result = []<br>
>     for k, v in d.items():<br>
>         if isinstance(v,np.ndarray):<br>
>             result.append((k, v.dtype, v.shape))<br>
>         else:<br>
>             result.append((k, mkdtype(v)))<br>
>     return np.dtype(result)<br>
><br>
> def dict2recarray(data, rec=None):<br>
>     ''' Creates numpy.recarray from data (dict)<br>
>     '''<br>
>     def _dict2recarray(data, rec):<br>
>         if rec.dtype.names:<br>
>             for n in rec.dtype.names:<br>
>                 _dict2recarray(data[n], rec[n])<br>
>         else:<br>
>             rec[:] = data<br>
>         return rec<br>
><br>
>     dtype = mkdtype(data)<br>
>     if rec is None:<br>
>         rec = np.zeros(dtype.shape, dtype)<br>
><br>
>     return _dict2recarray(data, rec)<br>
><br>
> datan_raw = {'DATA': {'D1': np.linspace( 0, 100, 8*4,).reshape(8, 4),<br>
>                       'D2': np.linspace( 0, 100, 10*5, ).reshape(10, 5),<br>
>                       'ND': {'D1': np.linspace( 0, 100, 10*5,<br>
> ).reshape(10, 5),<br>
>                              'D2': np.linspace( 0, 100, 8*4,).reshape(8,<br>
> 4), }}}<br>
><br>
> dtype = mkdtype(datan_raw)<br>
> *data_for_fits* = dict2recarray(datan_raw)<br>
><br>
><br>
> >>>>>> Code ends<br>
><br>
> I couldn't find documentation on how to build such a FITS structure<br>
> (nested recarrays).<br>
><br>
> One option is to build sub-recarrays into different BIN tables with a<br>
> header that would correspond to a nested key in the recarray. But that<br>
> would require creating another function to reconstruct the recarray<br>
> structure after reading the BIN tables from the FITS file.<br>
><br>
> The better option is to build FITS is such a manner that would retrieve<br>
> the structure correctly on FITS load().<br>
><br>
> Thank you for your help,<br>
><br>
> Best regards.<br>
><br>
> _______________________________________________<br>
> AstroPy mailing list<br>
> AstroPy@python.org<br>
> <a href="https://mail.python.org/mailman/listinfo/astropy" id="LPlnk561187" previewremoved="true">
https://mail.python.org/mailman/listinfo/astropy</a><br>
><br>
><br>
<br>
<br>
-- <br>
<br>
* * * * * * * * <a href="http://www.mssl.ucl.ac.uk/~npmk/" id="LPlnk846991" previewremoved="true">
http://www.mssl.ucl.ac.uk/~npmk/</a> * * * *
<div id="LPBorder_GT_15124266011610.6449997495177675" style="margin-bottom: 20px; overflow: auto; width: 100%; text-indent: 0px;">
<table id="LPContainer_15124266011570.7002364482120667" style="width: 90%; background-color: rgb(255, 255, 255); position: relative; overflow: auto; padding-top: 20px; padding-bottom: 20px; margin-top: 20px; border-top: 1px dotted rgb(200, 200, 200); border-bottom: 1px dotted rgb(200, 200, 200);" role="presentation" cellspacing="0">
<tbody>
<tr style="border-spacing: 0px;" valign="top">
<td id="TextCell_15124266011580.8636793644175864" style="vertical-align: top; position: relative; padding: 0px; display: table-cell;" colspan="2">
<div id="LPRemovePreviewContainer_15124266011580.23792962477727675"></div>
<div id="LPTitle_15124266011580.5072508535325234" style="top: 0px; color: rgb(0, 120, 215); font-weight: 400; font-size: 21px; font-family: "wf_segoe-ui_light","Segoe UI Light","Segoe WP Light","Segoe UI","Segoe WP",Tahoma,Arial,sans-serif; line-height: 21px;">
<a id="LPUrlAnchor_15124266011590.9158756652492915" style="text-decoration: none;" href="http://www.mssl.ucl.ac.uk/~npmk/" target="_blank">Paul Kuin, Mullard Space Science Laboratory, UCL</a></div>
<div id="LPMetadata_15124266011600.025745093393300222" style="margin: 10px 0px 16px; color: rgb(102, 102, 102); font-weight: 400; font-family: "wf_segoe-ui_normal","Segoe UI","Segoe WP",Tahoma,Arial,sans-serif; font-size: 14px; line-height: 14px;">
www.mssl.ucl.ac.uk</div>
<div id="LPDescription_15124266011600.1672952114029832" style="display: block; color: rgb(102, 102, 102); font-weight: 400; font-family: "wf_segoe-ui_normal","Segoe UI","Segoe WP",Tahoma,Arial,sans-serif; font-size: 14px; line-height: 20px; max-height: 100px; overflow: hidden;">
Space Science, Supernovae, Novae, Gamma Ray Bursts, Solar Flares, Coronal Mass Ejections, Stellar Winds and Coronae, N. Paul M. Kuin</div>
</td>
</tr>
</tbody>
</table>
</div>
<br>
Dr. N.P.M. Kuin      (n.kuin@ucl.ac.uk)<br>
phone +44-(0)1483 (prefix) -204111 (work)<br>
mobile +44(0)7908715953  skype ID: npkuin<br>
Mullard Space Science Laboratory  ? University College London  ?<br>
Holmbury St Mary ? Dorking ? Surrey RH5 6NT?  U.K.<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="http://mail.python.org/pipermail/astropy/attachments/20171204/8577ee9c/attachment-0001.html" id="LPlnk210587" previewremoved="true">http://mail.python.org/pipermail/astropy/attachments/20171204/8577ee9c/attachment-0001.html</a>><br>
<br>
------------------------------<br>
<br>
Message: 2<br>
Date: Mon, 4 Dec 2017 22:46:27 +0100<br>
From: Peter Teuben <teuben@astro.umd.edu><br>
To: astropy@python.org<br>
Subject: Re: [AstroPy] Nested recarrays in FITS<br>
Message-ID: <b1419060-493c-bf7e-0ff0-0d2bcd1d31a1@astro.umd.edu><br>
Content-Type: text/plain; charset="utf-8"<br>
<br>
<br>
?another thought on this:<br>
<br>
I think the original question was also limited in not explaining why fits was needed. I could argue for pickle. Paul is right, HDF might be a better match, especially if you have to switch to another language, HDF has a more native match to that. But does it
 have to be persistent data? otherwise using a python-c/fortran interface is far more efficient.? (I believe HDF is actually more flexible than the F in FITS).<br>
<br>
You can't beat a native pickle:<br>
<br>
??? ??? ??? import pickle<br>
??? ??? ??? pickle.dump(datan_raw,open("test.dat","wb"))<br>
??? ??? ??? ..<br>
??? ??? ??? new_raw = pickle.load(open("test.dat", "rb"))<br>
<br>
So perhaps we could return the question and ask in what situation you need this data structure (for).<br>
<br>
- peter<br>
<br>
On 12/04/2017 10:08 PM, Paul Kuin wrote:<br>
> I think that HDF does that for you. FIts is more flexible, but you have to do your own writes and retrievals. In the end you will be reinventing the wheel unless you check out how HDF does it, That's my opinion.?<br>
><br>
> Cheers,?<br>
><br>
> ? ?Paul<br>
><br>
> On Mon, Dec 4, 2017 at 9:02 PM, Arnon Sela <arnon.sela@gmail.com <<a href="mailto:arnon.sela@gmail.com">mailto:arnon.sela@gmail.com</a>>> wrote:<br>
><br>
>     Dear Whom that Can Help,<br>
><br>
>     I have nested numpy recarray structure to be stored into Fits.<br>
>     The following code is a just a test I used to build a nested structure (data_for_fits variable in the last line of the code).<br>
><br>
>     Code start >>>>>><br>
><br>
>         import numpy as np<br>
><br>
>         ''' The following two functions are adapted from:?<br>
>         adopted from <a href="https://stackoverflow.com/questions/32328889/numpy-structured-array-from-arbitrary-level-nested-dictionary">
https://stackoverflow.com/questions/32328889/numpy-structured-array-from-arbitrary-level-nested-dictionary</a> <<a href="https://stackoverflow.com/questions/32328889/numpy-structured-array-from-arbitrary-level-nested-dictionary">https://stackoverflow.com/questions/32328889/numpy-structured-array-from-arbitrary-level-nested-dictionary</a>><br>
>         '''<br>
><br>
>         def mkdtype(d):<br>
>         ? ? ''' Creates dtype for nested dictionary with numpy based type objects<br>
>         ? ? '''<br>
>         ? ? result = []<br>
>         ? ? for k, v in d.items():<br>
>         ? ? ? ? if isinstance(v,np.ndarray):<br>
>         ? ? ? ? ? ? result.append((k, v.dtype, v.shape))<br>
>         ? ? ? ? else:<br>
>         ? ? ? ? ? ? result.append((k, mkdtype(v)))<br>
>         ? ? return np.dtype(result)<br>
><br>
>         def dict2recarray(data, rec=None):<br>
>         ? ? ''' Creates numpy.recarray from data (dict)<br>
>         ? ? '''<br>
>         ? ? def _dict2recarray(data, rec):<br>
>         ? ? ? ? if rec.dtype.names:<br>
>         ? ? ? ? ? ? for n in rec.dtype.names:<br>
>         ? ? ? ? ? ? ? ? _dict2recarray(data[n], rec[n])<br>
>         ? ? ? ? else:<br>
>         ? ? ? ? ? ? rec[:] = data<br>
>         ? ? ? ? return rec<br>
>         ? ??<br>
>         ? ? dtype = mkdtype(data)<br>
>         ? ? if rec is None:<br>
>         ? ? ? ? rec = np.zeros(dtype.shape, dtype)<br>
>         ? ? ? ??<br>
>         ? ? return _dict2recarray(data, rec)<br>
><br>
>         datan_raw = {'DATA': {'D1': np.linspace( 0, 100, 8*4,).reshape(8, 4),<br>
>         ? ? ? ? ? ? ? ? ? ? ? 'D2': np.linspace( 0, 100, 10*5, ).reshape(10, 5),?<br>
>         ? ? ? ? ? ? ? ? ? ? ? 'ND': {'D1': np.linspace( 0, 100, 10*5, ).reshape(10, 5),?<br>
>         ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?'D2': np.linspace( 0, 100, 8*4,).reshape(8, 4), }}}<br>
><br>
>         dtype = mkdtype(datan_raw)<br>
>         */data_for_fits/* = dict2recarray(datan_raw)<br>
><br>
><br>
>     >>>>>> Code ends<br>
><br>
>     I couldn't find documentation on how to build such a FITS structure (nested recarrays).<br>
><br>
>     One option is to build sub-recarrays into different BIN tables with a header that would correspond?to a nested key?in the recarray. But that would require creating another function to reconstruct the recarray structure after reading the BIN tables from
 the FITS file.<br>
><br>
>     The better option is to build FITS is such a manner that would retrieve the structure correctly on FITS load().<br>
><br>
>     Thank you for your help,<br>
><br>
>     Best regards.<br>
><br>
>     _______________________________________________<br>
>     AstroPy mailing list<br>
>     AstroPy@python.org <<a href="mailto:AstroPy@python.org">mailto:AstroPy@python.org</a>><br>
>     <a href="https://mail.python.org/mailman/listinfo/astropy">https://mail.python.org/mailman/listinfo/astropy</a> <<a href="https://mail.python.org/mailman/listinfo/astropy">https://mail.python.org/mailman/listinfo/astropy</a>><br>
><br>
><br>
><br>
><br>
> -- <br>
><br>
> * * * * * * * * <a href="http://www.mssl.ucl.ac.uk/~npmk/">http://www.mssl.ucl.ac.uk/~npmk/</a> <<a href="http://www.mssl.ucl.ac.uk/%7Enpmk/">http://www.mssl.ucl.ac.uk/%7Enpmk/</a>> * * * *<br>
> Dr. N.P.M. Kuin ? ? ?(n.kuin@ucl.ac.uk <<a href="mailto:n.kuin@ucl.ac.uk">mailto:n.kuin@ucl.ac.uk</a>>) ? ? ?<br>
> phone +44-(0)1483 (prefix) -204111 (work)<br>
> mobile +44(0)7908715953 ?skype ID: npkuin<br>
> Mullard Space Science Laboratory ?? University College London ??<br>
> Holmbury St Mary ? Dorking ? Surrey RH5 6NT? ?U.K.<br>
><br>
><br>
> _______________________________________________<br>
> AstroPy mailing list<br>
> AstroPy@python.org<br>
> <a href="https://mail.python.org/mailman/listinfo/astropy">https://mail.python.org/mailman/listinfo/astropy</a><br>
<br>
<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="http://mail.python.org/pipermail/astropy/attachments/20171204/1e4458bb/attachment.html">http://mail.python.org/pipermail/astropy/attachments/20171204/1e4458bb/attachment.html</a>><br>
<br>
------------------------------<br>
<br>
Subject: Digest Footer<br>
<br>
_______________________________________________<br>
AstroPy mailing list<br>
AstroPy@python.org<br>
<a href="https://mail.python.org/mailman/listinfo/astropy">https://mail.python.org/mailman/listinfo/astropy</a><br>
<br>
<br>
------------------------------<br>
<br>
End of AstroPy Digest, Vol 135, Issue 2<br>
***************************************<br>
</div>
</span></font></div>
</div>
</div>
</body>
</html>