emchain takes some time to run. It is usually better run as a batch job (at command). Here are a few examples of how to use it. They assume that the SAS_CCF environment variable was set to the relevant Calibration Index File.
emchain odf=your_odf_dir > emchain.log 2> emchain.err (sh shell) emchain odf=your_odf_dir > emchain.log >& emchain.err (csh shell)
emchain odf=your_odf_dir badpixfindalgo=NO filteratt=Y filterhk=Y
emchain instruments=M2 exposures=S002 ccds='1 3 4' stoponerror=Y \ keepintermediate=Y
emchain rejectbadevents=N fulloutput=Y randomize='PE' ingtiset=hkgti.ds
emchain runccdloop=N runevlistcomb=N addvigweight=Y \ globalflare=N flaretimebin=104 flaremaxrate=1.2
emchain attcalc:attitudelabel=fixed attcalc:fixedra=204.6877 \ attcalc:fixeddec=-27.6984 attcalc:fixedposangle=59.378
emchain emframes:withsrccoords=Y \ emframes:srcra=204.6877 emframes:srcdec=-27.6984
rm *BPXFLI* *IMAGPR* emchain startfromodf=N clobber=N stopafterbadpixfind=Y
rm T*M*EVLI*.FIT emchain startfromodf=N
rm PooooooooooM2S004*.FIT emchain instruments=M2 exposures=4 clobber=N
emchain usecanonicalnames=N
XMM-Newton SOC -- 2023-04-16