Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
152 commits
Select commit Hold shift + click to select a range
5b270e9
Merge pull request #1 from CosmoStat/master
tobias-liaudat Jul 3, 2020
605bbf8
Merge branch 'master' of https://github.com/CosmoStat/shapepipe
tobias-liaudat Oct 13, 2020
8f6b4d7
Merge branch 'master' of https://github.com/CosmoStat/shapepipe
tobias-liaudat Oct 30, 2020
89c1543
ad config MMCD file
tobias-liaudat Nov 30, 2020
d45a456
Merge branch 'master' of https://github.com/CosmoStat/shapepipe
tobias-liaudat Nov 30, 2020
695495a
paste_cat: runner and script
martinkilbinger Feb 22, 2021
57c5982
PasteCat v1.1
martinkilbinger Feb 22, 2021
0eda3ed
paste_cat update
martinkilbinger Feb 22, 2021
9c7c9b9
paste cat cleaned up
martinkilbinger Feb 22, 2021
221aa34
Merge branch 'master' of github.com:CosmoStat/shapepipe
martinkilbinger Apr 8, 2021
6ae7566
requirements: astropy version 4.1 instead of newest one (erfa bug)
martinkilbinger Apr 8, 2021
8c8b8d3
requirements astropy version fix
martinkilbinger Apr 8, 2021
b96b8e0
small changes in job subm scripts
martinkilbinger Apr 13, 2021
e5633c1
download function in canfar utilities.
martinkilbinger Apr 19, 2021
6fa5d2f
libs: astropy 4.1, no mccd, installation works
martinkilbinger Apr 21, 2021
d6cdcd9
Merge remote-tracking branch 'upstream/master' into astropy_version
martinkilbinger Apr 21, 2021
f485ae1
Merge remote-tracking branch 'upstream/master'
tobias-liaudat Apr 22, 2021
2ee4e7d
Modify outlier from psf sizes to observed star sizes
tobias-liaudat Apr 22, 2021
b9606c2
Merge branch 'master' of https://github.com/CosmoStat/shapepipe
tobias-liaudat Apr 23, 2021
2fb3d01
Change option of fits.open() to avoid memmap
tobias-liaudat Apr 23, 2021
1a099f4
Merge remote-tracking branch 'upstream/master' into astropy_version
martinkilbinger Apr 26, 2021
c2f395d
job submission script: replace 'find' to avoid stderr
martinkilbinger Apr 26, 2021
1fbf1c3
Merge branch 'master' of https://github.com/CosmoStat/shapepipe
tobias-liaudat Apr 30, 2021
c102656
Update docs/wiki/candide.md
tobias-liaudat Apr 30, 2021
6c48dd9
Merge pull request #396 from tobias-liaudat/master
tobias-liaudat Apr 30, 2021
08da00f
Merge remote-tracking branch 'upstream/master' into astropy_version
martinkilbinger May 2, 2021
aba0a42
Merge branch 'astropy_version' of github.com:martinkilbinger/shapepip…
martinkilbinger May 2, 2021
63fca07
restored main version of req/env
martinkilbinger May 2, 2021
417c4fc
job_sp: find -> ls
martinkilbinger May 2, 2021
0ad6a33
Merge branch 'canfar' into mk
martinkilbinger May 2, 2021
61f9cdd
added newline
martinkilbinger May 3, 2021
2e1765a
Installation Set Up (#394)
sfarrens May 3, 2021
1dd019a
Merge pull request #397 from martinkilbinger/vos
martinkilbinger May 3, 2021
5a7da0b
post_proc mccd to improve
martinkilbinger May 7, 2021
8bd9b11
merge MCCD star cat script: added required X, Y
martinkilbinger May 7, 2021
c26e55b
CI Tests (#399)
sfarrens May 7, 2021
5a86df8
cleaned up dependency check
sfarrens May 7, 2021
e9caaeb
cfis -> utilities
martinkilbinger Jun 4, 2021
9dc57d3
scripts updated vis-a-vis cfis import
martinkilbinger Jun 4, 2021
0ba7a54
Merge branch 'vos' into mk
martinkilbinger Jun 4, 2021
45bbd00
Merge branch 'mk' of github.com:martinkilbinger/shapepipe into mk
martinkilbinger Jun 4, 2021
6bd9c66
added utilities function for 'vls'
martinkilbinger Jun 10, 2021
6b4b38e
Merge remote-tracking branch 'upstream/master' into mk
martinkilbinger Jun 10, 2021
977a6cc
removed comments
martinkilbinger Jun 10, 2021
aef4fb2
removed print line
martinkilbinger Jun 10, 2021
1ea15a6
conflict solved in canfar.py
martinkilbinger Jun 10, 2021
c82d584
quick cleanup of cfis.py
martinkilbinger Jun 10, 2021
571fb3d
passing tests
martinkilbinger Jun 10, 2021
1797b8e
init + utilities
martinkilbinger Jun 14, 2021
f1c414d
removed comment
martinkilbinger Jun 15, 2021
c9af7be
first revision spread model module
martinkilbinger Jun 15, 2021
2b1adfd
Merge remote-tracking branch 'origin/mk' into mk
martinkilbinger Jun 16, 2021
c30cadd
job_sp script: added vos upload dir to cmd line options
martinkilbinger Jun 17, 2021
71c9473
sm revised module, minor bug fixed
martinkilbinger Jun 17, 2021
aea18d6
Merge branch 'develop' into sm_rev
sfarrens Jun 17, 2021
6b3bf9b
removed debug print comment
martinkilbinger Jun 18, 2021
4a50552
Merge branch 'mk' of github.com:martinkilbinger/shapepipe into mk
martinkilbinger Jun 18, 2021
19b82f1
first draft of vignetmaker clean up
sfarrens Jun 23, 2021
ed0d12c
FWHM calculation: constant higher ornst higher prec
martinkilbinger Jun 29, 2021
fdc1679
Merge branch 'sm_rev' of github.com:martinkilbinger/shapepipe into sm…
martinkilbinger Jun 29, 2021
11a26ad
notebooks
martinkilbinger Jun 30, 2021
1e48c68
added f-strings and extra clean up
sfarrens Jul 6, 2021
ddaf48b
config_exp_mccd: Use MCCD inv_opt config file, works for 'outliers' v…
martinkilbinger Jul 12, 2021
1cf19cf
CFIS footprint: Added constellations; job_sp: added -c flag for confi…
martinkilbinger Jul 12, 2021
5088376
Added MCCD config files
martinkilbinger Jul 12, 2021
446386f
202007 W3 complete
martinkilbinger Jul 12, 2021
11eefe0
FITSCatalogue: overwrite option working for any FITS file, not only i…
martinkilbinger Jul 13, 2021
deb73a1
Merge remote-tracking branch 'upstream/master' into overwrite
martinkilbinger Jul 13, 2021
6b0ebc4
Merge pull request #411 from sfarrens/vignetmaker_cleanup
martinkilbinger Jul 15, 2021
3027fc4
typo in comment
martinkilbinger Jul 15, 2021
8d036b3
Merge remote-tracking branch 'upstream/master' into find_exp_rev
martinkilbinger Jul 15, 2021
852dc39
find_exposures module up to snuff
martinkilbinger Jul 15, 2021
a2b43ce
find exp: added missing code
martinkilbinger Jul 15, 2021
992a1ed
Merge remote-tracking branch 'upstream/develop' into find_exp_rev
martinkilbinger Jul 16, 2021
2f35a8f
added __init__.py files
martinkilbinger Jul 16, 2021
4b4a956
Merge branch 'find_exp_rev' of github.com:martinkilbinger/shapepipe i…
martinkilbinger Jul 16, 2021
5f8c21b
uncompress revised
martinkilbinger Jul 16, 2021
a80ee23
uncompress: bug fixed
martinkilbinger Jul 18, 2021
8437a78
passing tests
martinkilbinger Jul 18, 2021
fef7d56
canfar.py to new style
martinkilbinger Jul 19, 2021
7cd09eb
Merge remote-tracking branch 'upstream/develop' into overwrite
martinkilbinger Jul 19, 2021
c658f59
Merge pull request #427 from martinkilbinger/uncomp_rev
martinkilbinger Jul 21, 2021
737151f
Merge remote-tracking branch 'upstream/develop' into sm_rev
martinkilbinger Jul 21, 2021
192b69c
sm develop new syntax
martinkilbinger Jul 21, 2021
a479594
typo fixed
martinkilbinger Jul 22, 2021
e1e265f
added sm script
martinkilbinger Jul 22, 2021
bb77777
added sm script
martinkilbinger Jul 22, 2021
fd50e2a
Merge branch 'sm_rev' of github.com:martinkilbinger/ShapePipe into sm…
martinkilbinger Jul 22, 2021
2c55174
removed vignetmaker_runner2 from config file, to be tested with other PR
martinkilbinger Jul 22, 2021
5436996
Merge remote-tracking branch 'upstream/develop' into find_exp_rev
martinkilbinger Jul 23, 2021
811551f
Merge remote-tracking branch 'upstream/master' into find_exp_rev
martinkilbinger Jul 23, 2021
9aabbac
fixed typos from PR review
martinkilbinger Jul 23, 2021
c9b4e76
Merge pull request #423 from martinkilbinger/find_exp_rev
martinkilbinger Jul 23, 2021
fe35256
Merge remote-tracking branch 'upstream/develop' into sm_rev
martinkilbinger Jul 23, 2021
1794376
removed MKDEBUG comment
martinkilbinger Jul 23, 2021
f659471
Cleanup psfex (#413)
andrevitorelli Jul 23, 2021
caf8683
firt pass on clean up
sfarrens Jul 23, 2021
4cc366a
file_io overwrite bug fixed
martinkilbinger Jul 24, 2021
9271cf1
cleaned up psfex interpolation module
sfarrens Jul 29, 2021
7c04495
cleaned up make catalog module
sfarrens Jul 29, 2021
2ac5c84
Get images Runner revision (#429)
martinkilbinger Jul 30, 2021
9300786
Merge remote-tracking branch 'upstream/develop' into sm_rev
martinkilbinger Jul 30, 2021
dad2c3b
Multiple Module Runs (#415)
sfarrens Jul 30, 2021
4facf22
Merge remote-tracking branch 'upstream/develop' into overwrite
martinkilbinger Jul 30, 2021
b90c428
Merge branch 'develop' of https://github.com/CosmoStat/shapepipe into…
sfarrens Jul 30, 2021
b2ab609
removed commented lines and updated module runner
sfarrens Jul 30, 2021
7d164f3
Merge branch 'develop' of https://github.com/CosmoStat/shapepipe into…
sfarrens Jul 30, 2021
688f221
updated module runner
sfarrens Jul 30, 2021
da0da80
Merge branch 'develop' of https://github.com/CosmoStat/shapepipe into…
sfarrens Jul 30, 2021
98e0d5d
updated module runner
sfarrens Jul 30, 2021
b934064
Merge branch 'develop' into sm_rev
martinkilbinger Jul 30, 2021
194523b
PR review changes
martinkilbinger Jul 30, 2021
2f1253f
Merge branch 'sm_rev' of github.com:martinkilbinger/shapepipe into sm…
martinkilbinger Jul 30, 2021
d833645
PR review change requests
martinkilbinger Jul 30, 2021
1078b67
added module_config_sec
martinkilbinger Jul 30, 2021
a09af4f
Merge pull request #403 from martinkilbinger/sm_rev
martinkilbinger Jul 30, 2021
c6dc7f7
Merge remote-tracking branch 'upstream/develop' into overwrite
martinkilbinger Jul 30, 2021
76d71d2
small changes due to review
martinkilbinger Jul 30, 2021
25f1e23
review changes
martinkilbinger Jul 30, 2021
9276985
Martin's latest, small changes (#401)
martinkilbinger Jul 30, 2021
895f9b7
cfis first half to new syntax
martinkilbinger Jul 30, 2021
4f8fc6e
cfis 2nd half to new syntax
martinkilbinger Jul 30, 2021
6dbcc9f
passing tests
martinkilbinger Jul 30, 2021
8fbe6fb
Merge remote-tracking branch 'upstream/develop' into overwrite
martinkilbinger Jul 30, 2021
0a49079
python errors fixed
martinkilbinger Jul 30, 2021
0256bf2
MCCD cleanup + MCCD plot package: Adding rejection of objects with ze…
tobias-liaudat Jul 30, 2021
8ae412b
updated structure
sfarrens Jul 30, 2021
dd8574c
Merge remote-tracking branch 'upstream/develop' into overwrite
martinkilbinger Aug 4, 2021
e355eae
minor changes
martinkilbinger Aug 4, 2021
c641999
str -> f-str
martinkilbinger Aug 4, 2021
86c47ea
Merge pull request #414 from martinkilbinger/overwrite
martinkilbinger Aug 5, 2021
e7b2603
Merge pull request #430 from sfarrens/setools_cleanup
martinkilbinger Aug 5, 2021
f61752c
Merge remote-tracking branch 'upstream/develop' into setools_cleanup
martinkilbinger Aug 5, 2021
bfbd319
lower-case setools package dir (pb on Mac)
martinkilbinger Aug 5, 2021
7b93b62
f-string bug fix
martinkilbinger Aug 5, 2021
110d73c
changing aux to auxdir
Aug 6, 2021
59bdbf3
Merge pull request #438 from CosmoStat/folder_namechange
andrevitorelli Aug 6, 2021
4201f25
Merge branch 'model' into develop
martinkilbinger Aug 18, 2021
8640e3d
fixed references to file_io
sfarrens Sep 9, 2021
c8a2c9a
Merge branch 'make_catalog_cleanup' of https://github.com/sfarrens/sh…
sfarrens Sep 9, 2021
7928a77
save current state
sfarrens Sep 9, 2021
49bdbba
fixed bugs
sfarrens Sep 10, 2021
d85cb39
fixed last bug
sfarrens Sep 10, 2021
9ddc708
Merge pull request #435 from sfarrens/make_catalog_cleanup
martinkilbinger Sep 10, 2021
c3081c7
cleaned up
sfarrens Sep 10, 2021
e176971
added exceptions
sfarrens Sep 10, 2021
fa06728
fixed bugs
sfarrens Sep 10, 2021
c6767a6
Cleanup sextractor (#412)
aguinot Sep 17, 2021
2c358e4
checked canfar module (#455)
martinkilbinger Sep 17, 2021
c7e4196
fixed directory checks
sfarrens Sep 17, 2021
4b83444
Merge pull request #434 from sfarrens/psf_interp_cleanup
martinkilbinger Sep 20, 2021
9929dd1
Fixed code style issues
sfarrens Sep 20, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
128 changes: 86 additions & 42 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ ShapePipe
.. |python38| image:: https://img.shields.io/badge/python-3.8-green.svg
:target: https://www.python.org/

:Version: 0.0.3
:Version: 0.0.4

:Date: 19/05/2020
:Date: 15/07/2021

ShapePipe is a galaxy shape measurement pipeline developed within the
CosmoStat lab at CEA Paris-Saclay.
Expand Down Expand Up @@ -161,14 +161,14 @@ The pipeline can be run with SMP as follows:

.. code-block:: bash

$ ./shapepipe_run
$ shapepipe_run

A list of command line arguments can be displayed using the ``--help``
option:

.. code-block:: bash

$ ./shapepipe_run --help
$ shapepipe_run --help

Running the Pipeline with MPI
-----------------------------
Expand All @@ -177,7 +177,7 @@ The pipeline can be run with MPI as follows:

.. code-block:: bash

$ mpiexec -n <number_of_cores> ./shapepipe_run
$ mpiexec -n <number_of_cores> shapepipe_run

where ``<number_of_cores>`` is the number of cores to allocate to the run.

Expand Down Expand Up @@ -213,13 +213,18 @@ The configuration parameters for the pipeline are:
``shapepipe_runs``.
3. ``INPUT_DIR`` : (``str`` or ``list``) A valid directory containing input
files for the first module or a comma separated list of directories. This
parameter also recognizes the following special strings:
parameter also recognises the following special strings:

a. ``last:MODULE`` : This will point to the output directory of the last run
of the specified module.
b. ``PATTERN:MODULE`` : This will point to the output directory of a
b. ``all:MODULE`` : This will point to all the output directories in which
the specified module was run.
c. ``PATTERN:MODULE`` : This will point to the output directory of a
specified module from a run matching the specified pattern.

In all cases the module name can be succeded by the run number (*e.g.*
``MODULE_run_2``)

4. ``OUTPUT_DIR`` : (``str``) A valid directory to write the pipeline output
files.
5. ``FILE_PATTERN`` : (``str`` or ``list``) A list of string patterns to
Expand Down Expand Up @@ -256,6 +261,17 @@ additional values to list properties as follows:
[MODULE_NAME]
ADD_PARAMETER = PARAMETER VALUE

If a given module is run more than once, run specific parameter values can be
specified as follows:

.. code-block:: bash

[MODULE_NAME_RUN_X]
PARAMETER = PARAMETER VALUE

Where ``X`` is an integer greater than or equal to ``1``.


Development
===========

Expand All @@ -271,7 +287,7 @@ with the ``module_runner`` wrapper that outputs the module ``stdout`` and

.. code-block:: python

@module_runner()
@module_runner(version=0.1)
def example_module(*args)

# DO SOMETHING
Expand All @@ -282,7 +298,9 @@ The module runner decorator takes the following keyword arguments:

1. ``input_module`` : (``str`` or ``list``) The name of a preceding module(s)
whose output provide(s) the input to this module. Default value is ``None``.
2. ``version`` : (``str``) The module version. Default value is ``'0.0'``.
2. ``version`` : (``str``) The module version. Default value is ``'0.0'``. The
module version should always be explicitly declared and be greater than the
default value.
3. ``file_pattern`` : (``str`` or ``list``) The input file pattern(s) to look
for. Default value is ``''``.
4. ``file_ext`` : (``str`` or ``list``) The input file extensions(s) to look
Expand All @@ -297,7 +315,8 @@ The module runner decorator takes the following keyword arguments:
The arguments passed to the module runner are the following:

1. ``input_file_list`` : The list of input files.
2. ``output_dir`` : The directory for the module output files.
2. ``run_dirs`` : The dictionary containing module run paths (*e.g.* the output
path for a given module run is ``run_dirs['output']``).
3. ``file_number_string`` : The number pattern corresponding to the current
process.
4. ``config`` : The config parser instance, which provides access to the
Expand All @@ -308,7 +327,9 @@ The arguments passed to the module runner are the following:

parameter_value = config.get('MODULE_NAME', 'PARAMETER')

5. ``w_log`` : The worker log instance, which can be used to record additional
5 ``module_config_sec`` : A string specifying the configuration file section
to be read.
6. ``w_log`` : The worker log instance, which can be used to record additional
messages in the module output logs using the following structure:

.. code-block:: python
Expand All @@ -322,11 +343,10 @@ The following example module runners are provided in ``shapepipe.modules``.

**Python Example**

In this example a Python script using a ``Dummy()`` class is implemented. This
module does not read inputs from any preceding module, but looks for files
In this example a Python script using a ``PythonExample()`` class is implemented.
This module does not read inputs from any preceding module, but looks for files
in the ``INPUT_DIR`` that match the file patterns ``'numbers'`` and
``'letters'`` with file extension ``'.txt'``. This module depends on
``numpy``.
``'letters'`` with file extension ``'.txt'``. This module depends on ``numpy``.

As this module does not implement any system executable, it is not
necessary to return a ``stderr``. Instead any output content that should be
Expand All @@ -335,20 +355,31 @@ return ``None, None``.

.. code-block:: python

@module_runner(version='1.0', file_pattern=['numbers', 'letters'],
file_ext='.txt', depends='numpy')
def python_example(input_file_list, output_dir, file_number_string,
config, w_log):

output_file_name = ('{}/pyex_output{}.cat'.format(output_dir,
file_number_string))
message = config.get('PYTHON_EXAMPLE', 'MESSAGE')

inst = Dummy()
inst.read_files(*input_file_list)
inst.write_file(output_file_name, message)

return inst.content, None
@module_runner(
version='1.1',
file_pattern=['numbers', 'letters'],
file_ext='.txt',
depends='numpy',
)
def python_example_runner(
input_file_list,
run_dirs,
file_number_string,
config,
module_config_sec,
w_log,
):

output_file_name = (
f'{run_dirs["output"]}/pyex_output{file_number_string}.cat'
)
message = config.get(module_config_sec, 'MESSAGE')

inst = pe.PythonExample(0)
inst.read_files(*input_file_list)
inst.write_file(output_file_name, message)

return inst.content, None

**Executable Example**

Expand All @@ -358,17 +389,30 @@ the file pattern ``'process'`` with file extension ``'.cat'``.

.. code-block:: python

@module_runner(input_module='python_example', version='1.0',
file_pattern='pyex_output', file_ext='.cat', executes='head')
def execute_example(input_file_list, output_dir, file_number_string, *args):

command_line = 'head {}'.format(input_file_list[0])
output_file_name = '{}/head_output{}.txt'.format(output_dir,
file_number_string)
@module_runner(
input_module='python_example',
version='1.0',
file_pattern='pyex_output',
file_ext='.cat',
executes='head',
)
def execute_example_runner(
input_file_list,
run_dirs,
file_number_string,
config,
module_config_sec,
w_log,
):

command_line = f'head {input_file_list[0]}'
output_file_name = (
f'{run_dirs["output"]}/head_output{file_number_string}.txt'
)

stdout, stderr = execute(command_line)

text_file = open(output_file_name, 'w')
text_file.write(stdout)

stdout, stderr = execute(command_line)

text_file = open(output_file_name, 'w')
text_file.write(stdout)

return stdout, stderr
return stdout, stderr
Loading