Page 1 of 1

"withweights" parameter effect

Posted: Fri Oct 11, 2024 4:46 pm
by KathaE
Hello, I have a question about the effect of the "withweights" parameter in the expmap eSASS command.

The eSASS task documentation states that "If set to YES, exposure maps will be corrected for the fraction of the area supplied by each TM with respect to the nominal all-TM area", i.e. that single TM maps would contain only one seventh of the actual exposure.

Later, however, it is specified that should the parameter not be set "The merged maps are thus in a sense averages, not sums, of the TM-specific maps.".

I would like to be able to use the exposure maps in conjunction with the ARFs. On the page containing information on different ARFs it is stated that "Please note that the correct ARF file to use when taking exposure values from merged exposure maps is the TM0 on-axis one. This is because the exposure values in merged exposure maps from expmap are already corrected for the number of telescope modules in use and the vignetting of the telescope."

This leaves me somewhat uncertain as to what the correct choice here would be, if I would like to use single-TM exposure maps with their single-TM ARFs, or exposure maps of some but not all TMs with a combined (addarf) ARF of the same some but not all TMs.

I am aware that the on-axis ARF should be used if vignetting is included in the exposure map, but how exactly does the correction for the number of TMs work?

I would be really grateful for some advice on this! Thank you very much in advance!

Re: "withweights" parameter effect

Posted: Mon Oct 14, 2024 9:09 am
by IanStewart
Hi there, I'm the current maintainer of expmap. To give some background to what I am about to comment I will just say that I inherited this task from someone who has now left the project. It took me a while to figure out what it does and I will alas probably remain in the dark about the intent behind some of its functionality.

Ok so I have to apologize first off, because the task documentation is wrong. In fact the --withweights parameter has NO effect on single-TM maps, only on the merged maps. I think it is safe to assert that the on-axis ARF has zero effect on single-TM maps.

Merged-TM maps are ALWAYS averages over the TMs supplied in the input, the only difference the --withweights makes to this is that if it is set to 'no', the average is a simple one, i.e. the accumulated exposure map is divided by the number of TMs involved, whereas --withweights=yes calculates an average weighted by the relative sensitivity of each TM as a function of energy. For a broad energy band, the difference between a with-weights and a non-with-weights average can be significant, i.e. even a multiplicative factor of 2 or 3.

Where the weighting is applied, expmap uses TM-specific files from the calibration database that purport to contain ARF values. A second column in the database file contains a column that purports to contain the fractional contribution of that TM to the total sensitivity at a given photon energy. Hopefully these values would add to unity if summed for any energy across the TMs, but expmap does not currently check for this. I'm also not personally aware of how or when this calibration file was constructed. I'll consult among the team, maybe someone else knows.

Whether to use --withweights for merged maps? Hmm personally I think I would stick to 'no' as being slightly safer ground. I doubt it is possible even in theory to obtain really accurate exposure maps, certainly not in practice when one considers the compromises necessary for computing them (such as binning of energies, times etc), so they probably ought rather to be viewed as the best rough guide one can come up with in practice. Accurate exposures are arguably best calculated on a source-by-source basis using srctool.

Apologies again for the incorrect doco, we'll patch this.

Re: "withweights" parameter effect

Posted: Mon Oct 14, 2024 12:15 pm
by IanStewart
Hi again,

Actually this issue has sparked a bit of a discussion. Can you wait a day or two until we arrive at a consensus answer?

Cheers Ian.

Re: "withweights" parameter effect

Posted: Tue Oct 15, 2024 3:29 pm
by KathaE
Hi Ian,

Thanks for the in-depth answer! Of course, I can wait a few days if there's still things to discuss concerning this topic.
Thanks for taking the time to double check this!

Cheers, Katharina