This function may be performed alone by calling the script with entrystage and finalstage=`detprep'.
Task eimsim is designed to allow the user to supply their own source-detection script. (See the eimsim documentation for a description of the requirements of such a script.) As with other parts of the eimsim functionality, there may be source-detection functions or jobs which only need to be done once and others (eg to do with the actual detection) which need to be done anew during each simulation run. The `once-only' jobs can be separated and placed into another script which is called at the present stage of eimsimprep. At present, the eimsim package contains two example det prep scripts: eimsimdetprep1xmm and eimsimdetprep2xmm, corresponding to the respective detection scripts and template sets.
A user-written det prep script must fulfil the following requirements:
It is helpful to construct the script so that it has an optional entry point named `cleanup'. The function of this portion of the det prep script should be just to delete all intermediate files. In other words, the det prep script should be so designed, that it deletes all its intermediate files if invoked as follows:
<det prep task> entrystage=cleanup
XMM-Newton SOC -- 2021-11-30