For NuSTAR, the CALDB stores two sets of RMF files, to be used for event files filtered or not filtered for the depth cut. Each set stores the RMF file appropriate for each detector pixel or group of detector pixels. The association between pixels and CALDB RMF files is specified in the CALDB RMF Grouping File provided in input through the parameter 'grprmffile'.
'numkrmf' first reads the keyword 'DEPTHCUT' of the input event file to select the appropriate 'grprmffile' CALDB file. Next, for each CALDB RMF file, computes the number of events in the input event file ('infile') within the input spatial region file (parameter 'srcregionfile'). The response of the detector is finally generated by 'numkrmf' calculating a weighted mean of the CALDB RMF files. The mean is computed using as weights the corresponding number of events and making use of the multi-mission FTOOL 'addrmf'. Optionally, by setting the input parameter 'cmprmf' to 'yes, the output RMF file is compressed using the multi-mission FTOOL 'cmprmf'.
> numkrmf infile=nu40060001001A01_cl.evt srcregionfile=source.reg outfile=nu40060001001A01_sr.rmf