Quickstart
Basic simulation using package data. PISTA package data includes filter profiles and PSF profiles for INSIST. This can be utilized for simulating images using INSIST specifications.
Initialization
import pista as pt
from pathlib import Path
from astropy.table import Table
import matplotlib.pyplot as plt
data_path = Path(pt.__file__).parent.joinpath()
%matplotlib inline
Source Catalog
tab = Table.read(f'{data_path}/data/sample.fits') # FITS Table
df = tab.to_pandas() # PISTA requires pandas DataFrame
Telescope parameters
tel_params = {
'aperture' : 100,
'pixel_scale' : 0.1,
'psf_file' : f'{data_path}/data/PSF/INSIST/on_axis_poppy.npy',
'response_funcs' : [ f'{data_path}/data/INSIST/UV/Filter.dat,1,100',
f'{data_path}/data/INSIST/UV/Coating.dat,5,100', # 5 mirrors
f'{data_path}/data/INSIST/UV/Dichroic.dat,2,100', # 2 dichroics
],
'coeffs' : 0.87
}
Initialize Imager object
sim = pt.Imager(df = df,tel_params = tel_params, n_x = 500, n_y = 500, exp_time = 2400)
sim.show_field(figsize=(12, 10))
(<Figure size 1200x1000 with 2 Axes>,
<Axes: title={'center': 'Requested Center : RA : 11.069 degrees, Dec : 41.352 degrees | 539 sources\n Fov(RA) : 0.0139 (deg) | Fov(Dec) : 0.0139 (deg)'}, xlabel='RA (Degrees)', ylabel='Dec (Degrees)'>)
Detector parameters
det_params = { 'shot_noise' : 'Gaussian',
'G1' : 1,
'PRNU_frac' : 0.25/100,
'qe_response': [f'{data_path}/data/INSIST/UV/QE.dat,1,100'],
'RN' : 3,
'T' : 218,
'DN' : 0.01/100
}
Simulate Image
sim(det_params = det_params, photometry = 'Aper')
sim.show_image()
Generating stars...
Illuminating CCD...
Running Aperture Photometry using Photutils
(<Figure size 1500x1000 with 2 Axes>,
<WCSAxes: title={'center': 'Digital \nRequested center : RA : 11.069 degrees, Dec : 41.352 degrees'}>)