The following steps should be taken to run nibackgen3C50 as a patch on your HEASoft installation. Alternatively, one can run the tool from within an existing HEASoft installation without explicitly installing it. ***INSTALLING AND RUNNING nibackgen3C50 UNDER HEASoft*** (1) Download and "install" bgmodel_3C50_RGv5.tar.gz in some directory, "mybackdir"; the 'bkgdir' parameter may then be set to mybackdir/bg_model_3C50_RGv5. Note that a couple of ascii tables were modified from Ron's original (tabs removed). (2) Go to a terminal with HEASoft already set up. (3) Download and install nibackgen3C50.tar.gz in the nicer/tasks directory, e.g. /mysoftwaredir/heasoft-6.26.1/nicer/tasks (a) copy nibackgen3C50.tar.gz to /mysoftwaredir/heasoft-6.26.1/nicer/tasks (b) unpack the tarfile tar -xzvf nibackgen3C50.tar.gz (c) build and install the task cd nibackgen3C50 hmake hmake install (If reinstalling, 'hmake clean' before 'hmake') One may type "fhelp nibackgen3C50" (and "plist nibackgen3C50") for additional details, and examples. (4) In its simplest single-obsid implementation, nibackgen3C50 rootdir='dataparentdir' obsid='1200190101' \ bkgdir='mybackdir/bg_model_3C50_RGv5' creates total and background spectra corresponding to OBSID 1200190101, where 1200190101 is a standard NICER directory located under the dataparentdir root directory. (5) To implement the task for a particular pair of "ufa" and "cl" event files nibackgen3C50 rootdir='NONE' obsid='NONE' \ bkgdir='mybackdir/bg_model_3C50_RGv5' calevtdir='NONE' \ ufafile='ufa_merged.evt' clfile='total_merged.evt' mkfile='NONE' ***NOTE ON GTI EXTENSION NAMES*** Please note that the GTI extension of the cleaned event file specified by the 'clfile' parameter must be named GTI (EXTNAME = 'GTI'). This is the case for the NICER files in the archive but not necessarily, e.g., for those derived using the extractor ftool. If necessary, please issue the command fthedit clean_merged.evt EXTNAME a "GTI" (or, if deriving using the extractor ftool, set parameter gti=GTI) Also, its a good idea to check the exposure time of the "total" spectrum produced by nibackgen3C50 to make sure that the extractor call in the task properly set the exposure time to the sum of the intervals in the GTI. (a) gtisum nibackgen3C50_tot.pi Running GTISUM_v1.3 ======================== Ext. HDUCLAS1 Num.Intervals GTI Start GTI End GoodTime (sec) 0 'IMAGE ' 1 'SPECTRUM' 2 'GTI ' MM 123456789 123459876 NNNN (b) ftlist nibackgen3C50_tot.pi K | grep EXPOSURE (c) If EXPOSURE is not equal to NNNN, fthedit nibackgen3C50_tot.pi EXPOSURE a NNNN where NNNN is the output from gtisum ***RUNNING nibackgen3C50 WITHOUT INSTALLING IT*** (1) Download and "install" bgmodel_3C50_RGv5.tar.gz in some directory, "mybackdir"; the 'bkgdir' parameter may then be set to mybackdir/bg_model_3C50_RGv5. Note that a couple of ascii tables were modified from Ron's original (tabs removed). (2) Go to a terminal with HEASoft already set up. (3) Unpack the tarfile tar -xzvf nibackgen3C50.tar.gz and copy nibackgen3C50.par to your 'pfiles' directory (4) In its simplest single-obsid implementation, nibackgen3C50.pl rootdir='dataparentdir' obsid='1200190101' \ bkgdir='mybackdir/bg_model_3C50_RGv5' creates total and background spectra corresponding to OBSID 1200190101, where 1200190101 is a standard NICER directory located under the dataparentdir root directory. (5) To implement the task for a particular pair of "ufa" and "cl" event files nibackgen3C50.pl rootdir='NONE' obsid='NONE' \ bkgdir='mybackdir/bg_model_3C50_RGv5' calevtdir='NONE' \ ufafile='ufa_merged.evt' clfile='total_merged.evt' mkfile='NONE' The only difference between these commands and those described above, is that the ".pl" suffix must be explictly included. ***NOTE ON GTI EXTENSION NAMES*** Please note that the GTI extension of the cleaned event file specified by the 'clfile' parameter must be named GTI (EXTNAME = 'GTI'). This is the case for the NICER files in the archive but not necessarily, e.g., for those derived using the extractor ftool. If necessary, please issue the command fthedit clean_merged.evt EXTNAME a "GTI" (or, if deriving using the extractor ftool, set parameter gti=GTI) Also, its a good idea to check the exposure time of the "total" spectrum produced by nibackgen3C50 to make sure that the extractor call in the task properly set the exposure time to the sum of the intervals in the GTI. (a) gtisum nibackgen3C50_tot.pi Running GTISUM_v1.3 ======================== Ext. HDUCLAS1 Num.Intervals GTI Start GTI End GoodTime (sec) 0 'IMAGE ' 1 'SPECTRUM' 2 'GTI ' MM 123456789 123459876 NNNN (b) ftlist nibackgen3C50_tot.pi K | grep EXPOSURE (c) If EXPOSURE is not equal to NNNN, fthedit nibackgen3C50_tot.pi EXPOSURE a NNNN where NNNN is the output from gtisum