setenv SAS_ODF /path_to_my_ODF_directory/my_ODF_directory
setenv SAS_CCF /path_to_my_CIF/ccf.cif
evselect table='MOS.evt:EVENTS' imagebinning='binSize' imageset='image.fits' withimageset=yes xcolumn='X' ycolumn='Y' ximagebinsize=20 yimagebinsize=20
imgdisplay withimagefile=true imagefile=image.fits
evselect table='MOS.evt:EVENTS' expression='#XMMEA_EM&&(PI>10000)&&(PATTERN==0)' rateset="background_lightcurve.fits" timebinsize=10 withrateset=yes maketimecolumn=yes
tabgtigen table=background_lightcurve.fits expression="COUNTS<15" gtiset=background_gti.fits
evselect table="MOS.evt:EVENTS" energycolumn='PI' expression='#XMMEA_EM&&(PATTERN<=12)&>i(background_gti.fits,TIME)&&((X,Y) IN circle(25800,25870,400))' spectrumset=source_spectrum.fits withspectrumset=yes
evselect table="MOS.evt:EVENTS" energycolumn='PI' expression='#XMMEA_EM&&(PATTERN<=12)&>i(background_gti.fits,TIME)&&((X,Y) IN annulus(25800,25870,500,1000))' spectrumset=background_spectrum.fits withspectrumset=yes
rmfgen spectrumset=source_spectrum.fits rmfset=response.rmf
arfgen spectrumset=source_spectrum.fits arfset=ancillary.arf rmfset=response.rmf withrmfset=yes