The Instrument object

The Instrument class within galfind is an abstract base class containing references to both the Facility class that it is a part of and the names of the filters which it uses for photometric imaging. It is parent to 4 Singleton child classes which, in order of increasing wavelength coverage, are: ACS_WFC, WFC3_IR, NIRCam, MIRI. The Facility class is also an abstract base class parent to 2 Singleton classes, namely HST (ACS_WFC and WFC3_IR) and JWST (NIRCam and MIRI). These base class names are chosen to follow the convention used in the SVO.

There are, of course, more potential optical or NIR facility/instrument combinations that the user may wish to include in their analysis that are excluded from the 4 above but included in the SVO database. These are, most notably, Spitzer/IRAC, JWST/NIRISS, HST/WFC3_UVIS, HST/NICMOS, and any ground based cameras such as Subaru/HSC or CFHT/MegaCam. There is no particular limitation preventing us from including these other than merely available time, and any contributions to galfind regarding this would be gladly accepted (follow this link for more information regarding this). It is worth baring in mind that the most major time consumption here is the handling of PSF modelling and subsequent aperture corrections, which we will get onto in both this notebook and the next.

Example 1: Singleton objects

To start off, we need to first instantiate a Singleton object. For this example, we shall arbitrarily choose NIRCam. There is nothing particularly fancy going on here since this is a singleton object. Once we instantiate one instance of NIRCam, any further instances match it.

[ ]:
from galfind import NIRCam

# Create a NIRCam object
nircam = NIRCam()

# Print the NIRCam object
print(nircam)

# Add random attributes to the NIRCam object
nircam.random_attribute = 42
nircam.whos_a_good_singleton = "I am!"

# Create another NIRCam object to showcase the Singleton
nircam2 = NIRCam()
print(nircam2)

# Delete the second NIRCam object (also deletes the first)
del nircam2
Failed to start the Kernel.

Unhandled error.

View Jupyter <a href='command:jupyter.viewOutput'>log</a> for further details.

Example 2: Making model NIRCam PSFs with WebbPSF

Example 3: Making empirical PSFs for NIRCam from the JOF imaging

Example 4: Comparing model and empirical PSFs

Example 5: Calculating aperture corrections from the PSFs