Skip to main content

7DT image-specific Tractor photometry pipeline

Project description

tract7dt

7DT image-specific Tractor photometry pipeline.
This distribution is licensed under MIT.

Installation

  1. Install Tractor (see https://github.com/dstndstn/tractor; however the upstream README seems outdated; use the recommended steps below).
  2. Install this package:
python -m pip install tract7dt

astrometry.net and Tractor must be installed in advance. Python prerequisites such as numpy, scipy, astropy, photutils, sep, matplotlib, fitsio, emcee, and PyYAML are declared as dependencies.

Tractor installation (recommended)

1) Conda environment

conda create -n {envname} python=3.11 -y
conda activate {envname}

2) System dependencies (apt)

sudo apt update
sudo apt install -y build-essential python3-dev git pkg-config \
    libcfitsio-dev libeigen3-dev swig libceres-dev \
    libgoogle-glog-dev libgflags-dev libsuitesparse-dev

3) Python build tools + scientific stack

pip install -U pip setuptools wheel cython numpy scipy fitsio emcee matplotlib

4) astrometry.net (required by Tractor)

conda install -c conda-forge astrometry -y

5) Tractor build (Cython + Ceres enabled)

git clone https://github.com/dstndstn/tractor.git
cd tractor
python setup.py build_ext --inplace --with-ceres --with-cython
pip install . --no-build-isolation

6) Verify install

python -c "import tractor; print(tractor.__version__)"
python -c "from tractor.ceres_optimizer import CeresOptimizer; print('CeresOptimizer OK')"
python examples/tractor-sdss-synth.py

Quick start

1) Create a YAML config

# Writes sample_config.yaml in the current directory by default.
tract7dt dump-config

# Or write to a specific path.
tract7dt dump-config --out sample_config.yaml

# Use --force to overwrite an existing file.
tract7dt dump-config --force

2) Download sample image data for test runs

# Download under current directory with original dataset folder name.
tract7dt download-sample-data

# Or set an explicit dataset directory path.
tract7dt download-sample-data --dir "/path/to/sample_data_dir"

# Overwrite an existing target dataset directory.
tract7dt download-sample-data --dir "/path/to/sample_data_dir" --force

Without --dir, the command creates the dataset under the current directory using the archive's original dataset folder name.
With --dir /path/to/sample_data_dir, the dataset directory is created at that exact path.
In both cases, FITS names are standardized to 7DT_UDS_m***.fits and image_list.txt is generated with absolute paths.

Maintainers can control source asset defaults via:

  • TRACT7DT_SAMPLE_REPO
  • TRACT7DT_SAMPLE_TAG
  • TRACT7DT_SAMPLE_ASSET
  • optional checksum: TRACT7DT_SAMPLE_SHA256

3) Edit required config paths

At minimum, set:

  • inputs.tile_name
  • inputs.input_catalog
  • inputs.image_list_file
  • inputs.gaiaxp_synphot_csv
  • outputs.work_dir

4) Run the full pipeline

tract7dt run --config /path/to/config.yaml

Role of the config file

  • The YAML config centralizes runtime decisions (inputs, outputs, checks, ePSF behavior, patch options, merge behavior, logging, performance knobs).
  • tract7dt run --config ... reads this single file and executes the full step chain.
  • Subcommands share the same config model, so one file can drive full runs and partial reruns consistently.

For full command/config/behavior reference, see the docs in docs/ (or publish with Read the Docs using .readthedocs.yaml).

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

tract7dt-0.3.0.tar.gz (58.5 kB view details)

Uploaded Source

Built Distribution

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

tract7dt-0.3.0-py3-none-any.whl (63.3 kB view details)

Uploaded Python 3

File details

Details for the file tract7dt-0.3.0.tar.gz.

File metadata

  • Download URL: tract7dt-0.3.0.tar.gz
  • Upload date:
  • Size: 58.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.9

File hashes

Hashes for tract7dt-0.3.0.tar.gz
Algorithm Hash digest
SHA256 22f5ba8ef4f9ed61ee7257cb8af33bf4f33a86045fc4d6b5a1bde3236a553d24
MD5 ea1c1461894c00f9a5de3374136c991c
BLAKE2b-256 b2b86c9e5fac0cfa611a9c308d7d2f8af76985672f2834374ace7ee3dfb5f7f2

See more details on using hashes here.

File details

Details for the file tract7dt-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: tract7dt-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 63.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.9

File hashes

Hashes for tract7dt-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3378c796bb71dd0d280f8f6bfe3fe252b89e54f065babf3779d5013ffe0a7d6e
MD5 bda04c9b5e210936218abda2f46331e5
BLAKE2b-256 5da0f0a156dd208ac9155012e8075929453756a65d0768403ebd4d51e7d5ad1f

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