This is a Docker-based pipeline for preparing sextractor-ready multiwavelength images

Overview

Pipeline for creating NB422-detected (ODI) catalog

The repository contains a Docker-based pipeline for preprocessing observational data. The pipeline creates a "master catalog" that combines sextractor catalogs from the input of NB422 (ODI) and other broadband images in COSMOS field. The pipeline is fully automatic except during certain tasks in the pipeline that require user input (e.g. IRAF msccmatch, imexamine and sextractor tasks).

Features:

  • run environment is independent of local machine
  • only re-run necessary steps after changing input data and parameters
  • automatically analyze stdout from IRAF iterstat and imexamine tasks and use result for the following step
  • suuport multiple host operating systems

The pipeline is not meant to be run as is but should be modified to suit specific data analysis routine.

license

Licensed under the MIT license; see LICENSE

Software used in the example

SAOImageDS9, Python/AstroPy, IRAF/PyRaf, IDL, SExtractor

Prerequisites

  • Docker
  • IDL, Python3 (if running the IDL-based generate_kernel task is desired)

Instructions

  1. prepare mosaic images and name them as NB422.fits, g.fits etc under a folder (rms images g.rms.fits); Download coordinate file from Gaia server to the same folder and name it as gaia.coo
  2. make any necessary changes to adapt the code to your workflow
  3. edit docker-compose.yml and change /path/to/data_folder to the actual location of the data folder on the host machine
  4. (steps 4-6 apply only if you want to run the generate_kernel task) open a new terminal, run export REQUEST_PORT=8088 and export RESPONSE_PORT=8089 (or any other port that you choose) in both terminals
  5. copy server.py and generate_kernel.pro to the data folder
  6. run python server.py
  7. Back in the repository, run docker build -t odi_pipeline . to build the image
  8. After the image is built successfully, run docker-compose run --service-ports pipeline to create a container
  9. inside the container, run python3 -m py_programs.tasks.runner create_makefile
  10. go to /mnt/data folder and run make master_catalog.csv
    • caution: for Mac and Windows users, check Addtional Notes

Brief explanation of data processing in the pipeline

  1. calibrate astrometry using gaia.coo, use IRAF msccmatch task
  2. copy the new wcs in the mosaic image headers to their rms images, use IRAF wcscopy
  3. (steps 3-4 apply only to broadband images) reproject the broadband images to the same tangent point and pixel scale of NB422.fits, use IRAF wregister
    • caution: turn on flux_conserve when dealing with the mosaic images; no need for rms maps
  4. match the reprojected rms map to the sky noise of the reprojected mosaic image, use IRAF iterstat
  5. make flag map of NB image, use Python
  6. measure the image PSFs, use IRAF imexamine
  7. make moffat PSFs, use Python
  8. generate kernels, that transform original (broadband) PSFs to NB PSF, use IDL max_entropy
  9. convolve broadband images, make sure all images have the same PSF, use Python
  10. run sextractor, make a master catalog
  11. All done!

Additional notes

  • IDL is required for creating kernels bb_to_nb.fits. The command is run on the host machine to avoid the complexity of installing IDL and setting up the license. The host communicates with the dock container via a basic TCP connection.
  • The pipeline has been thoroughly tested on a 64-bit Ubuntu host.
  • touch command is used after some IRAF/PyRAF tasks because IRAF changes the modification time of input files in an unexpected way, which makes the timestamp-based make system unusable

Operation system support

  • For both Windows and Mac systems:
    • edit docker-compose.yml: change environment: DISPLAY=host.docker.internal:0.
    • edit server.py (line:29) and py_programs/func/generate_kernel.py (line:8): change 127.0.0.1 to host.docker.internal.
  • Windows:
  • Mac:
    • must have XQuartz installed
    • Launch XQuartz. Under the XQuartz menu, select Preferences
    • Go to the security tab and ensure "Allow connections from network clients" is checked.
    • Run xhost + ${hostname} to allow connections to the macOS host
    • For Mac with M1 processors, run export DOCKER_DEFAULT_PLATFORM=linux/amd64 before docker build
Helper to organize your windows on your desktop.

The script of positionsing windows on the screen. How does it work? Select your window to move/res

Andrii D. 1 Jul 09, 2021
A joke conlang with minimal semantics

SyntaxLang Reserved Defined Words Word Function fo Terminates a noun phrase or verb phrase tu Converts an adjective block or sentence to a noun to Ter

Leo Treloar 1 Dec 07, 2021
School helper, helps you at your pyllabus's.

pyllabus, helps you at your syllabus's... WARNING: It won't run without config.py! You should add config.py yourself, it will include your APIKEY. e.g

Ahmet Efe AKYAZI 6 Aug 07, 2022
Python framework to build apps with the GASP metaphor

Gaspium Python framework to build apps with the GASP metaphor This project is part of the Pyrustic Open Ecosystem. Installation | Documentation | Late

5 Jan 01, 2023
Small exercises to get you used to reading and writing Python code!

Pythonlings Welcome to Pythonlings, an automated Python tutorial program (inspired by Rustlings and Haskellings). WIP This program is still working in

鹤翔万里 5 Sep 23, 2022
py-js: python3 objects for max

Simple (and extensible) python3 externals for MaxMSP

Shakeeb Alireza 39 Nov 20, 2022
Unofficial Python implementation of the DNMF overlapping community detection algorithm

DNMF Unofficial Python implementation of the Discrete Non-negative Matrix Factorization (DNMF) overlapping community detection algorithm Paper Ye, Fan

Andrej Janchevski 3 Nov 30, 2021
This python application let you check for new announcements from MMLS, take attendance while your lecturer is sharing QR Code on the screen.

This python application let you check for new announcements from MMLS, take attendance while your lecturer is sharing QR Code on the screen.

wyhong3103 5 Jul 17, 2022
A chain of stores wants a 3-month demand forecast for its 10 different stores and 50 different products.

Demand Forecasting Objective A chain store wants a machine learning project for a 3-month demand forecast for 10 different stores and 50 different pro

2 Jan 06, 2022
Advanced IPv4 Subnet Calculator in Python3

Advanced IPv4 Subnet Calculator in Python3 Table of Contents Getting Started Installation How it works? SVI Configuration Template Previews Getting St

Osama Abbas 1 May 10, 2022
【教程】莉沫酱教你学继承!?

【教程】莉沫酱教你学继承! 众所周知,类的继承就是说当一个类死亡的时候,它的子类会获得它拥有的资源。 根据类的继承法不同,各个子类能获得的资源也不同。 继承法的类型 在解释继承法之前,我们先定义三个类,一个父类A,和它的子类B、C。 它们都拥有x、y、z三个属性。

黄巍 17 Dec 05, 2022
Simple Crud Python vs MySQL

Simple Crud Python vs MySQL The idea came when I was studying MySQ... A desire to create a python program that can give access to a "localhost" databa

Lucas 1 Jan 21, 2022
A python module for DeSo

DeSo.py A python package for DeSo. Developed by ItsAditya Run pip install deso to install the module! Examples of How To Use DeSo.py Getting $DeSo pri

ItsAditya 0 Jun 30, 2022
Dapp / Forge traces enhancer

traces-explorer Dapp / Forge traces enhancer Usage traces.py and pattern_* files should be in the same directory make test traces.txt py traces.

1 Feb 02, 2022
Explore-bikeshare-data - GitHub project as part of the Programming for Data Science with Python Nanodegree from Udacity

Date created February 10, 2022 Project Title Explore US Bikeshare Data Descripti

Thárcyla 1 Feb 14, 2022
DeDRM tools for ebooks

DeDRM_tools DeDRM tools for ebooks This is a fork of Apprentice Harper's version of the DeDRM tools. I've added some of the PRs that still haven't bee

2 Jan 10, 2022
A fast Python in-process signal/event dispatching system.

Blinker Blinker provides a fast dispatching system that allows any number of interested parties to subscribe to events, or "signals". Signal receivers

jason kirtland 1.4k Dec 31, 2022
Some ideas and tools to develop Python 3.8 plugins for GIMP 2.99.4

gimp-python-development Some ideas and tools to develop Python 3.8 plugins for GIMP 2.99.4. GIMP 2.99.4 is the latest unstable pre-release of GIMP 3.

Ismael Benito 53 Sep 25, 2022
Task dispatcher for Postgres

Features a task being ran as an OS process supports task queue with priority and process limit per node fully database driven (a worker and task can b

2 Dec 06, 2021
Modern API wrapper for Genshin Impact built on asyncio and pydantic.

genshin.py Modern API wrapper for Genshin Impact built on asyncio and pydantic.

sadru 212 Jan 06, 2023