GALPROP
https://galprop.stanford.edu/forum/

Extract antiproton information from the .fits example
https://galprop.stanford.edu/forum/viewtopic.php?f=3&t=220
Page 1 of 2

Author:  nicoviaux [ Mon Sep 21, 2015 4:53 am ]
Post subject:  Extract antiproton information from the .fits example

Hi,

From the example topic in the webpage, I downloaded "nuclei_44_999726pub.gz", this contains a .fits file, how I can extract (in a mac) the antiproton information? I mean, Energy v/s Flux?

Best

Nicolas

Author:  strong [ Mon Sep 21, 2015 5:38 am ]
Post subject:  Re: Extract antiproton information from the .fits example

That is a very old example, but anyway the format is explained in Section 3.4 of the GALPROP Explanatory Supplement, the latest version and examples are at
http://sourceforge.net/projects/galprop/


As explained there, in file nuclei_.... the nuclei are ordered on axis 4 (for 2D) and antiprotons have
NUCZxxx = -1
NUCAxxx = 1
Axis 1 corresponds to R so choose the bin at R=8.5 for local values (using CRVAL1 and CDELT2).
Axis 2 has just one entry, for z=0
Axis 3 is the flux as a function of energy, log scale, see the explanation in the Supplement.
The units are also explained in the Supplement.


To read the files you can use the HEASARC fv tool, available for mac.
There is also a standalone c++ converter for these files at http://sourceforge.net/projects/gcrconvert/.

Author:  nicoviaux [ Mon Sep 21, 2015 5:47 am ]
Post subject:  Re: Extract antiproton information from the .fits example

Hi,

Ok, there is a more easy way to obtain from GALPROP the antiproton flux v/s energy in a table format,, in order to directly use,,, handle .fits format is not easy to me.

Author:  strong [ Mon Sep 21, 2015 5:51 am ]
Post subject:  Re: Extract antiproton information from the .fits example

all GALPROP output is in FITS only. But fv is very easy and can dump it as a table.

Author:  nicoviaux [ Mon Sep 21, 2015 5:56 am ]
Post subject:  Re: Extract antiproton information from the .fits example

Hi,

I have fv open, could you guide me in order to obtain the table, and on which example?

Best and thanks

Nicolás

Author:  strong [ Mon Sep 21, 2015 6:16 am ]
Post subject:  Re: Extract antiproton information from the .fits example

download case reltest19 included in the above distribution, then I will describe that.

Author:  nicoviaux [ Mon Sep 21, 2015 6:22 am ]
Post subject:  Re: Extract antiproton information from the .fits example

In the FITS folder I only see files with reltest02,,,,

Author:  nicoviaux [ Mon Sep 21, 2015 6:25 am ]
Post subject:  Re: Extract antiproton information from the .fits example

Ok, I found it

Author:  nicoviaux [ Mon Sep 21, 2015 7:12 am ]
Post subject:  Re: Extract antiproton information from the .fits example

Hi,

Recently I can open the fits with pyrites,,, but I don't know how to continue

Author:  strong [ Mon Sep 21, 2015 7:35 am ]
Post subject:  Re: Extract antiproton information from the .fits example

I don't know pyrites. Anyway you should view the FITS header with it, and display the data as tables. The table is 4D (R,z,energy,nucleus) : can you see it?

Author:  nicoviaux [ Mon Sep 21, 2015 7:43 am ]
Post subject:  Re: Extract antiproton information from the .fits example

YEs, I saw 5 columns, see the attached file

Attachments:
Screenshot 2015-09-21 11.42.49.png
Screenshot 2015-09-21 11.42.49.png [ 85.24 KiB | Viewed 18062 times ]

Author:  strong [ Mon Sep 21, 2015 8:06 am ]
Post subject:  Re: Extract antiproton information from the .fits example

look at the header to find the number N for antiprotons with NUCZ=-1 NUCA=1
then the spectrum is in array (8, 1, *, N)
where 8 is R=8 kpc roughly (since gridsize is CDELT1=1 kpc) (or interpolate between 8 and 9)
1 is z=0 i.e. in the Galactic plane
* are the 77 spectrum values (log10(E)=CRVAL3+ CDELT3 * (i-1), i=1-77

Author:  nicoviaux [ Mon Sep 21, 2015 9:01 am ]
Post subject:  Re: Extract antiproton information from the .fits example

Hi,

Ok, in which folder of Galprop_54 I can find the example that you said "reltest19" what I found is "galdef_54_reltest19" in the Galdef folder, but that file is not a fits file.

Best

Nicolás

Author:  strong [ Mon Sep 21, 2015 9:23 am ]
Post subject:  Re: Extract antiproton information from the .fits example

in the tar file there should be a folder FITS which contains the complete output files for this case.

Author:  nicoviaux [ Mon Sep 21, 2015 9:32 am ]
Post subject:  Re: Extract antiproton information from the .fits example

Hi,

Ok, N=2 , so what I want is in the array (8, 1, *, 2), and how I can extract this info in fv??

Best and Thanks

Nicolás

Page 1 of 2 All times are UTC - 8 hours [ DST ]
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/