Skip to main content

A thorough structure for precise photometry and deconvolution of time series of wide field images.

Project description

logo

python pypi tests License: GPL v3 Docs

LightCurver

Welcome to lightcurver! This is a photometry library leveraging STARRED, best used with time series of wide-field images. You can read more about it in the documentation.

lightcurver essentially prepares a Point Spread Function (PSF) model for each wide-field image, before using it to precisely calibrate the relative zero point between each image. Finally, STARRED models the pixels of the region of interest, yielding of course high quality light curves of the point sources in the region of interest, but also recovering the subpixel information to provide a high signal-to-noise ratio deconvolution of the region of interest itself. The example below shows a cutout of a wide-field image (one in a set of a hundred), the model/deconvolution, and the Hubble Space Telescope image of the same region.

example_deconvolution

Features

  • Uses plate solving (https://astrometry.net/) to keep track of the footprint of each frame, allowing for an independent selection of reference stars in each frame.
  • Leverages Gaia information to select the right reference stars in the field of view.
  • Never interpolates: essential to preserve the sub-pixel information that can be reocovered by STARRED in a multi-epoch deconvolution.
  • Provides an extremely precise relative flux calibration between epochs and a PSF model for each epoch.
  • Uses sqlite3 queries to dynamically determine which process needs be executed on which frame. (adding a new frame does not require the reprocessing of everything).
  • Attempts to keep the number of created files to a minimum, this is crucial when working on servers with high lattency storage.

Getting Started

  1. Requirements: on top of the python libraries listed in requirements.txt, we need either

    • a working installation of astrometry.net, which provides the solve-field function.
    • alternatively, an astrometry.net API key.
  2. Installation: Clone the repository and install via pip:

    git clone git@github.com:duxfrederic/lightcurver.git
    cd lightcurver
    pip install -e lightcurver
    
  3. Usage: There are several preparation steps to complete before you can start analyzing your wide field images.

  • Define a working directory, we will call it workdir.
  • Create a subdirectory, header_parser, in workdir, and create a python file: $workdir/header_parser/parse_header.py. This file should contain a function, parse_header, which should extract the exposure time, the gain, and the MJD or some other time information. See the example header parser directory for an example.
  • Copy the example config file, and update it with your information. Now you can run lightcurver:
    # important before importing: tell the code where your config file is
    import os
    os.environ['LIGHTCURVER_CONFIG'] = "/path/to/your_config.yaml"
    
    from lightcurver.pipeline.workflow_manager import WorkflowManager
    wf_manager = WorkflowManager()
    wf_manager.run()
    

lightcurver will run several steps of analysis on your wide-field images, like a pipeline.

The implemented processing steps

flowdiagram

Contributing

Whether you're fixing a bug, implementing a new feature, or improving documentation, your efforts are highly appreciated. If you are using this code and are encountering issues, feel free to contact me or to directly open an issue or pull request.

License

LightCurver is licensed under the GPL v3.0 License. See the LICENSE file for more details.

Contact

Have questions or suggestions? Feel free to open an issue, a pull request, or reach out!

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

lightcurver-1.0.2.tar.gz (17.4 kB view hashes)

Uploaded Source

Built Distribution

lightcurver-1.0.2-py3-none-any.whl (17.6 kB view hashes)

Uploaded Python 3

Supported by

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