import os import sys import numpy as np from astropy.io import fits from astropy import wcs from astropy.wcs import WCS from astropy.io.fits import update from astropy.io.fits import getdata import glob from astropy.table import QTable, Table, Column from astropy import units as u from astropy.coordinates import SkyCoord # High-level coordinates from astropy.coordinates import ICRS, Galactic, FK4, FK5 # Low-level frames from astropy.coordinates import Angle, Latitude, Longitude # Angles import statistics import shutil def create_folder(folder): if not (os.path.exists(folder)): os.makedirs(folder) def remove_file(filename): if(os.path.isfile(filename)==True): os.remove(filename) def do_evtool_esass(events,outfile): cmd=["evtool", "eventfiles=\'{}\'".format((" ").join(events)), "outfile=%s" %(outfile), "image=yes", "flag=0x2000", "pattern=15" ] # run the command print((" ").join(cmd)) os.system((" ").join(cmd))