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
Fast STL (ASCII & Binary) importer for Blender

blender-fast-stl-importer Fast STL (ASCII & Binary) importer for Blender based on https://en.wikipedia.org/wiki/STL_(file_format) Technical notes: flo

Iyad Ahmed 7 Apr 17, 2022
Its a simple and fun to use application. You can make your own quizes and send the lik of the quiz to your friends.

Quiz Application Its a simple and fun to use application. You can make your own quizes and send the lik of the quiz to your friends. When they would a

Atharva Parkhe 1 Feb 23, 2022
NFT-Image-Generator - Utility to generate a large collection of unique images

NFT-Image-Generator Utility for creating a generative art collection from suppli

Sem Moolenschot 60 Dec 15, 2022
An OrpheusDL Tidal module

OrpheusDL - Tidal A Tidal module for the OrpheusDL modular archival music program Report Bug · Request Feature Table of content About OrpheusDL - Tida

Daniel 54 Dec 29, 2022
Um pequeno painel de consulta

Spynel Um pequeno painel com consultas de: IP CEP PLACA CNPJ OBS: caso execute o script pelo termux, recomendo que use o da F-Droid por ser mais atual

Spyware 12 Oct 25, 2022
🗽 Like yarn outdated/upgrade, but for pip. Upgrade all your pip packages and automate your Python Dependency Management.

pipupgrade The missing command for pip Table of Contents Features Quick Start Usage Basic Usage Docker Environment Variables FAQ License Features Upda

Achilles Rasquinha 529 Dec 31, 2022
Import modules and files straight from URLs.

Import Python code from modules straight from the internet.

Nate 2 Jan 15, 2022
Simple Python-based web application to allow UGM students to fill their QR presence list without having another device in hand.

Praesentia Praesentia is a simple Python-based web application to allow UGM students to fill their QR presence list without having another device in h

loncat 20 Sep 29, 2022
qecsim is a Python 3 package for simulating quantum error correction using stabilizer codes.

qecsim qecsim is a Python 3 package for simulating quantum error correction using stabilizer codes.

44 Dec 20, 2022
PhD document for navlab

PhD_document_for_navlab The project contains the relative software documents which I developped or used during my PhD period. It includes: FLVIS. A st

ZOU YAJING 9 Feb 21, 2022
FileTransfer - to exchange files from phone to laptop

A small website I locally host on my network to exchange files from my phone and other devices to my laptop.

Ronak Badhe 4 Feb 15, 2022
Imports an object based on a string import_string('package.module:function_name')() - Based on werkzeug.utils

DEPRECATED don't use it. Please do: import importlib foopath = 'src.apis.foo.Foo' module_name = '.'.join(foopath.split('.')[:-1]) # to get src.apis.f

Bruno Rocha Archived Projects 11 Nov 12, 2022
An example file showing a simple endpoints like a login/logout function and maybe some others.

Flask API Example An example project showing a simple endpoints like a login/logout function and maybe some others. How to use: Open up your IDE (or u

Kevin 1 Oct 27, 2021
Code for ML, domain generation, graph generation of ABC dataset

This is the repository for codes for ML, domain generation, graph generation of Asymmetric Buckling Columns (ABC) dataset in the paper "Learning Mechanically Driven Emergent Behavior with Message Pas

Peerasait Prachaseree (Jeffrey) 0 Jan 28, 2022
A compiler for ARM, X86, MSP430, xtensa and more implemented in pure Python

A compiler for ARM, X86, MSP430, xtensa and more implemented in pure Python

Windel Bouwman 277 Dec 26, 2022
This is a Python program I wrote to simulate the solar system with 79 lines of code.

Solar System With Python This is a Python program I wrote to simulate the solar system with 79 lines of code. Required modules tkinter, math, time Why

Mehmet Aydoğmuş 1 Oct 26, 2021
A discord group chat creator just made it because i saw people selling this stuff for like up to 40 bucks

gccreator some discord group chat tools just made it because i saw people selling this stuff for like up to 40 bucks (im currently working on a faster

baum1810 6 Oct 03, 2022
A promo calculator for sports betting odds.

Sportbetter Calculation Toolkit Parlay Calculator This is a quick parlay calculator that considers some of the common promos offered. It is used to id

Luke Bhan 1 Sep 08, 2022
Konomi: Kind and Optimized Next brOadcast watching systeM Infrastructure

Konomi 備考・注意事項 現在 α 版で、まだ実験的なプロダクトです。通常利用には耐えないでしょうし、サポートもできません。 安定しているとは到底言いがたい品質ですが、それでも構わない方のみ導入してください。 使い方などの説明も用意できていないため、自力でトラブルに対処できるエンジニアの方以外に

tsukumi 243 Dec 30, 2022
HiQ - A Modern Observability System

🦉 A Modern Observability System HiQ is a declarative, non-intrusive, dynamic and transparent tracking system for both monolithic application and dist

Oracle Sample Code 40 Aug 21, 2022