Commit 44b5b5b3 authored by Mohammad Akhlaghi's avatar Mohammad Akhlaghi

first commit: udf10 cutouts done

The UDF10 region cutouts are now made.
parents
*~
*.txt
reproduce/build
\ No newline at end of file
reproduce/config/gnuastro/
\ No newline at end of file
# Broad-band photometry checks with MUSE generated broad-band images.
#
# Original author:
# Mohammad Akhlaghi <mohammad.akhlaghi@univ-lyon1.fr>
# Contributing author(s):
# Copyright (C) 2016, Mohammad Akhlaghi.
#
# This script is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This script is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# A copy of the GNU General Public License is available at
# <http://www.gnu.org/licenses/>.
# Configurations
# --------------
#
# These are the general configuration variables for a large number of
# independent rules, so they need to be included up here.
# Configuration parameters
include reproduce/config/internal/*.mk
# First goal is the default
# -------------------------
all: $(BSYM) file.txt
# Rules
# -----
#
# Note that we cannot simply include `reproduce/src/*.mk'. Because the
# order of reading them into Make actually matters in some cases.
include $(foreach m, preparations download input-cutouts , \
reproduce/src/$(m).mk)
# Phony targets
# -------------
#
# These are targets that do not correspond to a file (phony in the
# Make terminology). The following rules define what they do.
.PHONY: all
# Clean rules
# -----------
#
# To clean the outputs if necessary.
# Reproduction pipeline
nolog 1
onlydirconf 1
#onlyversion 0.1
# Operating mode:
imgmode 0
wcsmode 1
# Input image and catalog parameters:
hdu 0
xcol 1
ycol 2
iwidth 201
racol 3
deccol 4
wwidth 3
hstartwcs 0
hendwcs 0
# Output parameters:
checkcenter 3
suffix _crop.fits
\ No newline at end of file
# User specific directories. Note the points below:
#
# - The VALUES to these directories are initially JUST PLACE-HOLDERS!
# Please correct them based on your system.
#
# - The directories don't need to necessarily exist. If they do not
# exist, they will be created and the necessary data will be
# downloaded into them. Ofcourse provided that you have write
# permissions.
#
# - Do not use the tilde expansion `~' or variables for your home
# directory. Please use the full address, for example
# `/home/yourusername'.
#
# - An ending forward-slash `/' is not mandatory. When used, all these
# variables will be followed by a `/', so if the variable also has
# this a `/' included in its value, we will have `//' in the printed
# outputs, this can make reading the outputs harder and is thus not
# recommended.
# Survey directories
#
# This is where the survey images (with the same file-name standard as
# the main webpage) are stored. If this directory doesn't exist, or it
# doesn't contain the images (with the correct file-name formats), it
# will be created and the images will be downloaded. See
# `src/downloads.mk', for the URLs containing the expected inputs for
# each survey.
XDF = /home/mohammad/work/datasets/xdf
# Build directory
#
# This is where the outputs of each step are kept. Why a separate
# build directory? So the source and configuration files for this
# reproduction pipeline do not get crowded by derivative files. Also
# to make synchronization and backups more easy (the contents of the
# build directory do not need to be backed up).
BDIR = /home/mohammad/work/builds/muse-udf-photometry
# Symbolic link to build directory
#
# If you want a symbolic link to the build directory in this top
# source directory then use this variable to name the symbolic
# link. If the value is empty (nothing after the `=' sign) then no
# symbolic link will be created.
BSYM = reproduce/build
# MUSE inputs
#
# Directory keeping all the input MUSE images.
MUSEINPUTS = /home/mohammad/work/datasets/muse-udf-photometry
# Configuration files for programs
imgcrop = reproduce/config/gnuastro/astimgcrop.conf
# The broad-band filters
filters = f606w f775w f814w f850lp
# UDF10 region
# ============
#
# Vertices of polygon to define region to use UDF10.
udf10raa = 53.170105
udf10deca = -27.786864
udf10rab = 53.152458
udf10decb = -27.786585
udf10rac = 53.152486
udf10decc = -27.770861
udf10rad = 53.170294
udf10decd = -27.771096
# The polygon option for ImageCrop used for these vertices.
udf10polygon = --polygon=$(udf10raa),$(udf10deca):$(udf10rab),$(udf10decb):$(udf10rac),$(udf10decc):$(udf10rad),$(udf10decd)
# Download all the necessary input images if they are not already
# present in the specified directories. Note that downloading is
# essentially a serial (not parallel) operation (you have one input
# into the network), so the recipes in this Makefile all use a file
# lock to have one download script running at every instant.
#
# This Makefile is indented to be included by a Makefile that is in
# the top directory of this script.
#
# Copyright (C) 2016, Mohammad Akhlaghi <mohammad.akhlaghi@univ-lyon1.fr>
#
# This Makefile is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This Makefile is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details. See
# <http://www.gnu.org/licenses/>.
# Identify the downloader tool
# ----------------------------
downloader := $(shell if type curl > /dev/null; then downloader="curl -o"; \
else downloader="wget -O"; \
fi; echo "$$downloader"; )
# XDF
# ---
xdfacspre = hlsp_xdf_hst_acswfc-$(pixelscale)0mas_hudf_
xdfwfc3irpre = hlsp_xdf_hst_wfc3ir-$(pixelscale)0mas_hudf_
xdfweb = https://archive.stsci.edu/pub/hlsp/xdf
allxdf = $(foreach f, $(xdfacs), $(XDF)/$(xdfacspre)$(f)_v1_sci.fits) \
$(foreach f, $(xdfwfc3ir), $(XDF)/$(xdfwfc3irpre)$(f)_v1_sci.fits)
$(XDF):; mkdir $@
$(allxdf): $(XDF)/%: | $(XDF) $(locks)
flock $(locks)/download -c "$(downloader) $@ $(xdfweb)/$*"
# Broad-band photometry checks with MUSE generated broad-band images.
#
# Prepare the input cutouts for further processing.
#
# Original author:
# Mohammad Akhlaghi <mohammad.akhlaghi@univ-lyon1.fr>
# Contributing author(s):
# Copyright (C) 2016, Mohammad Akhlaghi.
#
# This script is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This script is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# A copy of the GNU General Public License is available at
# <http://www.gnu.org/licenses/>.
# Top level directory for all cutouts.
indir = $(BDIR)/input-cutouts
$(indir): $(BDIR); mkdir $@
# From original MUSE images
# -------------------------
#
# Cutout the udf10 and udf regions
udf10-muse-cutouts = $(foreach f, $(filters), $(indir)/udf10-muse-$(f).fits)
$(udf10-muse-cutouts): $(indir)/udf10-muse-%.fits: \
$(MUSEINPUTS)/muse-udf10-%.fits $(imgcrop) | $(indir)
astimgcrop $(udf10polygon) --wcsmode $< -h1 -o$@
file.txt: $(udf10-muse-cutouts)
echo "end of input-cutouts"
# Top level preparations for all the other Makefiles.
#
# This Makefile is indented to be included by a Makefile that is in
# the top directory of this script.
#
# Copyright (C) 2016, Mohammad Akhlaghi <mohammad.akhlaghi@univ-lyon1.fr>
#
# This Makefile is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This Makefile is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details. See
# <http://www.gnu.org/licenses/>.
# Make high-level directories
# ---------------------------
#
# If the value to BSYM (set in `config.mk') is not blank, then build a
# symbolic link to the build directory. Note that when the value is
# empty, it is not seen as a prerequisite to `all' either.
$(BDIR):; mkdir $@;
ifneq ($(BSYM),)
$(BSYM): | $(BDIR); ln -s $(BDIR) $(BSYM)
endif
$(locks): | $(BDIR); mkdir $@
# Version information
# -------------------
#
# Write all the necessary information into the TeX file. The versions
# need to be updated whenever the Git file has been updated (for
# example after a commit).
gitdescribe := $(shell git describe --dirty --always --abbrev=4)
gaversion := $(shell astmkprof --version | awk 'NR==1{print $$NF}')
$(mtexdir)/versions.tex: | $(mtexdir)
@echo "\\newcommand{\\commit}{$(gitdescribe)}" > $@
@echo "\\newcommand{\\gnuastrover}{$(gaversion)}" >> $@
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment