Dear All,
I'm currently trying to read in a .fits file into IDL (this is being done using a routine called MRDFITS which reads the .fits file into an IDL structure). So far I have been able to obtain information about how many columns and rows are within the structure (n_tags and n_elements) and then used this to simply create a double precision array of the same size.
I now want to transfer the data from the structure into the array.
For instance the first line of the structure looks like this
{ 2.3584720 0.10909307 18.3799 0.0305981 17.8795
0.0221304 17.1292 0.0457738 17.0786 0.0517783 0
0 0 0 -1 -1 -1 -1
0.373497 -1.24193 0.808172 -0.701736}
should I want the first element I would use the following
data(0,0)=structure(0).ra where ra was the tag name.
My question is, Is there anyway to replace the tag name .ra with that from the tag_names function so I can simply set up a loop to do all the reading for me, without me having to know the number of columns beforehand thus eliminating the need to define the .ra, .dec extensions.
Sorry if this is a bit unclear.
Many Thanks
David
|