lucabaldini / ixpeobssim

Simulation and analysis framework for the Imaging X-ray Polarimetry Explorer
GNU General Public License v3.0
9 stars 12 forks source link

Missing TLMIN and TLMAX in xpsimfmt output files #688

Closed lucabaldini closed 1 year ago

lucabaldini commented 1 year ago

Message from Keith:

Thanks Luca and Stefano,

I do need to add TLMIN2 and TLMAX2 keywords to give the valid range for the PI column to make them work in our s/w.

       Keith
lucabaldini commented 1 year ago

And I am sure this is the same thing as issue #588

So there are multiple aspects to this:

lucabaldini commented 1 year ago

In the event files produced by the SOC (specifically, I am looking at the Level 2 data for the Crab observation) I am seeing

TLMIN7  =                    1 / Minimum allowed value in column
TLMAX7  =                  600 / Maximum allowed value in column
TLMIN8  =                    1 / Minimum allowed value in column
TLMAX8  =                  600 / Maximum allowed value in column
TLMIN5  =                    1 / Minimum allowed value in column
TLMAX5  =                  374 / Maximum allowed value in column

in the header of the EVENTS extension. Column 5 is PI and columns 7 and 8 are X and Y. This makes perfect sense.

lucabaldini commented 1 year ago

I just created a sample file with pure xpobssim (version 30.1.1) and while the PI, X and Y columns are at positions 7, 14 and 15, respectively, I do see

TLMIN14 =                    1
TLMAX14 =                  600
TLMIN15 =                    1
TLMAX15 =                  600

but no trace of TLMIN7 and TLMAX7. These need to be added.

lucabaldini commented 1 year ago

And, just for fun, when I extract a PHA1 spectrum with xpbin, I do see the TLMIN and TLMAX keywords, although the values are

TLMIN1  =                    0 / first channel number
TLMAX1  =                  374 / last channel number

that is, 0 to 374 instead of 1 to 374.

lucabaldini commented 1 year ago

And, in fact, in a more recent event file from the SOC I do read

TLMIN7  =                    1 / Minimum allowed value in column
TLMAX7  =                  600 / Maximum allowed value in column
TLMIN8  =                    1 / Minimum allowed value in column
TLMAX8  =                  600 / Maximum allowed value in column
TLMIN5  =                    0 / Minimum allowed value in column
TLMAX5  =                  374 / Maximum allowed value in column

so I think we're all on the same page and know what to do :-)

lucabaldini commented 1 year ago

Now TLMIN and TLMAX is set in the standard event files produced by xpobssim, see https://github.com/lucabaldini/ixpeobssim/commit/cbaa467cccf95ab7df8069dd45975629f1e22290

lucabaldini commented 1 year ago

And the same for xpsimfmt, see https://github.com/lucabaldini/ixpeobssim/commit/a0011c7aff0cf3c62c6cf778d37a324a7de1b7fa

lucabaldini commented 1 year ago

Pull request under review: https://github.com/lucabaldini/ixpeobssim/pull/689

lucabaldini commented 1 year ago

Shipped in version 30.2.0