Skip to main content

Intensity modelling for multiply-imaged objects

Project description

Mimical (Modelling the Intensity of Multiply-Imaged Celestial Ancient Light)

Mimical is an intensity modelling code for multiply-imaged objects, performing simultaenous Bayseian inference of model parameters via the nested sampling algorithm. Mimical supports any astropy 2D model, and supports user defined parameter polynomial depenency with image wavelength.

Installation

Mimical can be installed with pip:

pip install mimical
docs/median_model_example.png

Required input

  1. images - 3D image array with dimensions (Nfilters, Ny, Nx)

  2. filt_list - An array of paths to filters curves of dimension Nfilters

  3. psfs - 3D PSF array with dimensions (Nfilters, My, Mx)

  4. mimical_prior - A Mimical prior

Mimical prior

Below is an example mimical_prior for a run using the default astropy sersic model. The first set of element keys must match the astropy model parameter names. Following this, the next element, named psf_pa, traces the rotation of the PSF. The final two elements must be named rms and flux_to_counts. The rms parameter traces the RMS noise in the image; this can be fit with Mimical but it is highly recommended to provide it to reduce dimensionality (see Fixing parameters). This is likewise for flux_to_counts, which helps Mimical calculate the poisson uncertainty associated with the generated model; this can be easily provided by the user with information on the gain and exposure time.

mimical_prior = {}

mimical_prior['amplitude'] = ((0, 10*images.max()), 'Individual')
mimical_prior['r_eff'] = ((0, images.shape[2]), 'Polynomial', 1)
mimical_prior['n'] = ((0.1, 10), 'Polynomial', 1)
mimical_prior['x_0'] = ((images.shape[2]/2-2, images.shape[2]/2+2), 'Polynomial', 0)
mimical_prior['y_0'] = ((images.shape[1]/2-2, images.shape[1]/2+2), 'Polynomial', 0)
mimical_prior['ellip'] = ((0,0.75), 'Polynomial', 0)
mimical_prior['theta'] = ((0, np.pi), 'Polynomial', 0)
mimical_prior['psf_pa'] = ((-180, 180), 'Polynomial', 0)
mimical_prior['rms'] = ((0,1), 'Individual')
mimical_prior['flux_to_counts'] = ((1,1e6), 'Individual')

Optional input and parameters

  • astropy_model = Sersic2D() - Any astropy 2D model

  • pool = None - Number of cores to parallelise likelihood calculations to

  • sampler = 'Nautilus' - The nested sampler to use, other options include Dynesty

  • oversample_boxlength = 15 - Length of box in the centre of the image to perform oversampling in

  • oversample_factor = 10 - Factor by which to oversample inside the above box

  • sextractor_clean = False - Whether or not to let Sextractor clean the images of other objects

  • sextractor_target_maxdistancepix='default' - Radius from the image centre at which Sextractor discards the closest object as contamination. Needed for when the target object is undetected.

Fixing parameters

You can fix any of the parameters in the Mimical prior by setting the first element in the parameter tuple equal to either a float / int / list / ndarray. For instance, to keep x_0 constant across all images, one would pass a float/int and choose the options ('Polynomial', 0). Or, to supply the RMS for each image separately, one would pass a list/ndarray of length Nfilters and choose the options (Individual).

Workflow diagram

docs/mimical_workflow.png

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mimical-0.2.2.tar.gz (32.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mimical-0.2.2-py3-none-any.whl (33.5 kB view details)

Uploaded Python 3

File details

Details for the file mimical-0.2.2.tar.gz.

File metadata

  • Download URL: mimical-0.2.2.tar.gz
  • Upload date:
  • Size: 32.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.2

File hashes

Hashes for mimical-0.2.2.tar.gz
Algorithm Hash digest
SHA256 9f97daaa01ac033a8d69c67f8e9730ddf1b0b4d2d8a2e25a69883b6a826b0553
MD5 7d7ac3ceedae491269b8040077b9a6a2
BLAKE2b-256 0e092c5f62397c55f1d5385b82f53618c6c5560093119ac2f8b1e1f867b0bc22

See more details on using hashes here.

File details

Details for the file mimical-0.2.2-py3-none-any.whl.

File metadata

  • Download URL: mimical-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 33.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.2

File hashes

Hashes for mimical-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a4da8d5211e5f9fd387095f45c66600fdfcb5a67557bfcd7a51c528462f06805
MD5 30109c6a7c978f794e7c633383d4b2f9
BLAKE2b-256 24024dc5adc324b62600d2b14be98b0c05206c61b073c052adb596335e8e6a0a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page