Open lucabaldini opened 8 years ago
May I suggest we call this chandra2ximpol.py? We can in principle convert a Chandra observation to whatever detector we want (e.g., IXPE), provided we have appropriate IRFs.
I updated the converter and, as suggested by Luca, I renamed it chandra2ximpol.py. Now you can pass a configuration file where the polarization model of the source is defined (you can find an example at config/chandra2ximpol_config.py). If the config file is not provided, the photoelectron angles are generated assuming a non-polarized source.
One thing that remains to fix is that, when using the Chandra ACIS-I detector, the effective area ratio is greater than one for a small energy interval around 2 keV. We need to take in account this fact adding events in some way.
Finally, I think it could be useful to add somewhere a simple function to rescale the MDP as a function of observation time, so that we can easily get the MDP corresponding to the time we are interested in.
Thinking about this a little bit more, I think it might be worth to add the possibility to specify the duration of the simulation, and allow the converter to re-sample the same event multiple times---since they're smeared with the XIPE response functions anyway, this should work.
The behaviour would be:
One issue that we have to think about in details is how we deal with the event times in this last case, but this is already a problem to some extent in the spectral regions where the ratio of the effective areas is larger than one.
How are we doing about closing this one? Is the documentation the only thing we're missing?
Yes, I have "only" to put all the stuff about the converter in the documentation.
I committed the first version of the converter, you can find it at bin/chandra2xipe.py. To run the script you need to provide it a Chandra event file, publicly available at http://cda.harvard.edu/pop/, in the advanced search section. At this time the photoelectron angle is not reconstructed (it's 0 for all events), we need to implement this feature according to source polarization.