Programs

  • 1. Median Smoothing with Bad Pixel Masking and Parallel Processing

    Program: mask_median_smooth.pro
    Purpose: Useful for removing galaxy halos when studying smaller embedded structures such as compact stellar systems or stellar streams.


    Features:

    1. Computes a median image using circular or square regions (box median) of an input image.
    2. Allows the use of a bad pixel mask of pixels (e.g. chip gaps or the compact objects of interest) to ignore when computing median.
    3. Uses IDL_IDLBRIDGE to split the input image into multiple subregions for parallel computation. Can split the image into 2, 4, 9, 16 and 25 chunks. The optimal choice of number of subregions to split the image into will depend on the size of the image, the size of the median box, and the number of cores available to carry out the computation.

    Pros:

    1. Significantly faster than IRAF MEDIAN.
    2. Allows masking of bad pixels and the use circular apertures when computing the median.
    3. Non-parametric, so more robust than fitting the galaxy using for example IRAF ELLIPSE, in particular mask_median_smooth.pro also works in cases where the galaxy centre is not located in the image.

    Cons:

    1. Requires IDL8.0 or higher, because of its use of IDL_IDLBRIDGE.
    2. Not as fast as SExtractor background estimation.

    Example:

      For this example I have median smoothed an input HST ACS image with 4212 x 4239 pixels using a circular median region with diameter 151 pixels. I used 16 subregions running on 16 individual cores, and the total running time was 1000s. In comparison a 151 pixel box median computed on the same machine using IRAF imfilter.median takes 4000s without the ability to mask or use a circular aperture.

      The upper left panel of the figure below shows the input HST image of the central regions of a nearby galaxy cluster, with several large galaxies visble. The upper right panel shows the mask image used to mask the bad pixels (and small objects of interest such as globular clusters). The lower left panel shows the resulting median smoothed image, and the lower right panel shows the residual image after removing the smoothed image from the input image.




      The second figure below shows a comparison between the median smoothed image produced by mask_median_smooth.pro on the left, and one produced by IRAF MEDIAN on the right. This comparison shows that as well as being faster the IDL code more accurately avoids the effects of bad pixels (such as the ACS chip gap) and reliably recovers the median image right to the edges of the input data image.


  • 2. Visualisation of Object Observability

    Program: observability.pro
    Purpose: To visualise the number of hours an object is above a range of airmasses (and hence observable) throughout the year.


    Features:

    1. Uses standard IDL astrolib routines to calculate sunrise and sunset and airmass of an object throughout a day, then calculates the amount of time the object is above a range of airmasses and the sun is more than 18 degrees below the horizon.
    2. Produces a visualisation of the length of time an object is above airmass 1.25, 1.5, 2, and 2.5, and also the length of day.

    Pros:

    1. Can use any observatory from the observatory.pro.
    2. Produces a tabular output of the time spent above the airmass values.

    Cons:

    1. Relatively slow as it computes the airmass in 5 minute intervals throughout the year.

    Example:

      In this example we produce output for the observability of the globular cluster NGC 5904 as observed from the Kitt Peak National Observatory.




  • 3. Simulation of LINC-NIRVANA Fizeau Interferometric Imaging

    Program: LINCSym Package
    Purpose: To simulate observations with LINC-NIRVANA in Lean-LINC mode i.e. observations with a single on-axis AO reference star.


    Features:

    1. Simulates observations with LINC-NIRVANA in Lean-LINC mode which uses a single on-axis bright AO star to provide atmospheric turbulence correction. As such unlike in full LINC-NIRVANA mode, the delivered Strehl ratio varies siginficantly over the LN FoV.

    Pros:

    1. Uses parallel processing to relatively quickly compute a user defined number of PSFs across the field of view, to capture the spatially varying nature of the PSF.
    2. Convolves an input "infinite resolution image" in sections using the spatially varying PSFs to produce an output simulated Lean-LINC observation.

    Cons:

    1. Computation of the full fizeau PSFs is still relatively slow.

    Example:

      The image shows a simulted Lean-LINC observation of a star cluster, with the central bright star providing the turbulence correction.




What is this?

On this page you will find some IDL/Python codes that I have written to aid in my research.