Skip to main content

Download WISE infrared data for many objects and process them with AMPEL

Project description

CI Coverage Status PyPI version DOI Binder

Infrared light curves from WISE data

This package downloads WISE data for positions on the sky and stacks single-exposure photometry per visit. It is designed to do so efficiently for large samples of millions of objects.

Prerequisites

Python version 3.11, 3.12 or 3.13.

If you want to not only download individual exposure photometry but also stack detections per visit (see below), you must have access to a running MongoDB* **.

* On MacOS have alook at the custom brew tap here to get the MongoDB community edition.

** On some systems this is not straight forward to set up. timewise requires it nevertheless as an integral part of the AMPEL system which is used to efficiently schedule and store the stacking of lightcurves. If you do not foresee a big overhead in calculating lightcurves for a sample of O(1000) objects, a more lightweight package might be more applicable.

Installation

If you use timewise only for downloading

The package can be installed via pip (but make sure to install the v1 pre-release):

pip install timewise

If you use timewise also for stacking individual exposures

You must install with the ampel extra:

pip install timewise[ampel]

To tell AMPEL which modules, aka units, to use, build the corresponding configuration file:

ampel config build -distributions ampel timewise -stop-on-errors 0 -out <path-to-ampel-config-file>

Command line interface

Read the short description below or have a look at the example notebook(s): Binder

 Usage: timewise [OPTIONS] COMMAND [ARGS]...                                                                
                                                                                                            
 Timewsie CLI                                                                                               
                                                                                                            
╭─ Options ────────────────────────────────────────────────────────────────────────────────────────────────╮
│ --log-level           -l      TEXT  Logging level (DEBUG, INFO, WARNING, ERROR, CRITICAL)                │
│                                     [default: INFO]                                                      │
│ --install-completion                Install completion for the current shell.                            │
│ --show-completion                   Show completion for the current shell, to copy it or customize the   │
│                                     installation.                                                        │
│ --help                              Show this message and exit.                                          │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────╯
╭─ Commands ───────────────────────────────────────────────────────────────────────────────────────────────╮
│ download        Download WISE photometry from IRSA                                                       │
│ prepare-ampel   Prepares the AMPEL job file so AMPEL can be run manually                                 │
│ process         Processes the lightcurves using AMPEL                                                    │
│ export          Write stacked lightcurves to disk                                                        │
│ run-chain       Run download, process and export                                                         │
│ plot            Make diagnostic plots                                                                    │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────╯

The input is a CSV file with at least three columns:

  • orig_id: an original identifier that must be an integer (for now)
  • ra, dec: Right Ascension and Declination

timewise is configured with a YAML file. This is a sensible default which will use all single exposure photometry from AllWISE and NEOWISE:

download:
  input_csv: <path-to-input>

  backend:
    type: filesystem
    base_path: <path-to-working-directory>

  queries:
    - type: positional
      radius_arcsec: 6
      table:
        name: allwise_p3as_mep
      columns:
        - ra
        - dec
        - mjd
        - cntr_mf
        - w1mpro_ep
        - w1sigmpro_ep
        - w2mpro_ep
        - w2sigmpro_ep
        - w1flux_ep
        - w1sigflux_ep
        - w2flux_ep
        - w2sigflux_ep

    - type: positional
      radius_arcsec: 6
      table:
        name: neowiser_p1bs_psd
      columns:
        - ra
        - dec
        - mjd
        - allwise_cntr
        - w1mpro
        - w1sigmpro
        - w2mpro
        - w2sigmpro
        - w1flux
        - w1sigflux
        - w2flux
        - w2sigflux

ampel:
  mongo_db_name: <mongodb-name>

This configuration file will be the input to all subcommands. Downloading and stacking can be run together or separate.

To only download the data:

timewise download <path-to-config-file>

The photometry can be found in FITS files in the working directory specified in the configuration file
along with metadata JSON files. These tell timewise which quries have already completed (per chunk) so the download process can be interrupted and re-started at a later time.

Stack individual exposure by visits

As mentioned above, this needs installation with the ampel extra.

To execute the stacking after the download:

timewise process <path-to-config-file> <path-to-ampel-config-file>

Make some diagnostic plots to check the datapoint selection and binning:

timewise plot <path-to-config-file> <indices-to-plot> <output-directory>

As a shortcut, you can also run download, stacking, and export in one command:

timewise run-chain <path-to-config-file> <path-to-ampel-config-file> <output-directory>

For more configuration options of the stacking, you can run AMPEL manually.

  1. Prepare an AMPEL job file for stacking the single-exposure data:
timewise prepare-ampel <path-to-config-file>

The result will contain the path to the prepared AMPEL job file.

  1. Run the AMPEL job
ampel job -config <path-to-ampel-config-file> -schema <path-to-ampel-job-file>

Citation

If you use timewise please make sure to cite Necker et al. A&A 695, A228 (2025). Additionally, you might want to include a reference to the specific version you are using: DOI

Difference lightcurves

Make sure to check out timewise-sup, the Timewise Subtraction Pipeline: link.

Project details


Release history Release notifications | RSS feed

Download files

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

Source Distribution

timewise-1.0.0.tar.gz (43.1 kB view details)

Uploaded Source

Built Distribution

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

timewise-1.0.0-py3-none-any.whl (57.3 kB view details)

Uploaded Python 3

File details

Details for the file timewise-1.0.0.tar.gz.

File metadata

  • Download URL: timewise-1.0.0.tar.gz
  • Upload date:
  • Size: 43.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.4.1 CPython/3.11.15 Linux/6.17.0-1018-azure

File hashes

Hashes for timewise-1.0.0.tar.gz
Algorithm Hash digest
SHA256 42a66efb194331d48f0c2ad6cebfa27f4c53c07280795f0e2ff4adfef44085b4
MD5 2c9a283fbb79736253a760373a99a004
BLAKE2b-256 1bd0fc0405a344d6717832a222a3771f770e0fbd6c861cb583181c9cc16aae11

See more details on using hashes here.

File details

Details for the file timewise-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: timewise-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 57.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.4.1 CPython/3.11.15 Linux/6.17.0-1018-azure

File hashes

Hashes for timewise-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 af7e01be46bc9749a4d050e8a340c64c42579c6d4b074feaaf8f264e112616d3
MD5 528f4841ad253bc7dd1eb5917928c3a2
BLAKE2b-256 f8310745810232e81b85238935f0fdcb6a56c0013ca151d61dcd6fc2029d83e7

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