Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mask runner check for existing files to skip processing #676

Closed
wants to merge 135 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
135 commits
Select commit Hold shift + click to select a range
6934d27
added Dockerfile and GH action
sfarrens Nov 16, 2022
82bc72a
added make dependency
sfarrens Nov 16, 2022
29c609e
docker testing
martinkilbinger Nov 1, 2023
da18970
Merge remote-tracking branch 'upstream/develop' into docker_image
martinkilbinger Nov 3, 2023
5770367
Dockerfile tests
martinkilbinger Nov 8, 2023
3166e3c
Added cent-os to CI tests
martinkilbinger Nov 8, 2023
373722e
Added pyproject
martinkilbinger Nov 9, 2023
b025b6a
canfar pyproject update
martinkilbinger Nov 10, 2023
ba135f2
cfis vos configs: missing keywords, DR5 added
martinkilbinger Nov 10, 2023
07cafb4
Testing dockerfile with only conda env installed
martinkilbinger Nov 15, 2023
92a999c
Fixing numpy and astropy versions
martinkilbinger Nov 15, 2023
2b6600d
installation on canfar working: removed most versions from yml file; …
martinkilbinger Nov 17, 2023
b6e5c97
Dockerfile for image 0:7, 0:8
martinkilbinger Nov 17, 2023
bc66565
Installation of sextractor and psfex with conda
martinkilbinger Nov 19, 2023
0b3aac6
script to call curl with canfar contained updated, adding NCORE as ar…
martinkilbinger Nov 19, 2023
69317cb
added init scripts for canfar; job_sp added n_smp for further jobs
martinkilbinger Nov 19, 2023
d35bd69
script to call curl for canfar container: added resources
martinkilbinger Nov 19, 2023
d93a60e
testing input numbers
martinkilbinger Nov 19, 2023
fb83a27
removed debug msg
martinkilbinger Nov 20, 2023
e33972b
numpy error fixed with version upgrade
martinkilbinger Nov 20, 2023
edbec76
Merge branch 'science_portal_run' of github.com:martinkilbinger/shape…
martinkilbinger Nov 20, 2023
9aa16be
Getting ready for exclusive-one-tile processing
martinkilbinger Nov 22, 2023
e5d0335
Added command line option to specify exclusive ID for processing
martinkilbinger Nov 22, 2023
49d8880
Merge remote-tracking branch 'origin/exclusive' into science_portal_run
martinkilbinger Nov 22, 2023
d02347e
curl script exclusive ID
martinkilbinger Nov 24, 2023
12e6b63
Dockerfile conda -> source activate
martinkilbinger Nov 24, 2023
b05f2a5
comment added
martinkilbinger Nov 24, 2023
45942d5
Updated Dockerfile
martinkilbinger Nov 24, 2023
7d1891e
running with exclusive ID
martinkilbinger Nov 24, 2023
02affa8
exp runs
martinkilbinger Nov 25, 2023
d8ad328
local curl script NCORES -> 1
martinkilbinger Nov 25, 2023
60c3cd1
Renamed science-portal scripts (local/remote)
martinkilbinger Nov 28, 2023
0737c0f
trying to run Pi
martinkilbinger Dec 1, 2023
7dba136
Merge remote-tracking branch 'origin/science_portal_run' into exclusive
martinkilbinger Dec 1, 2023
c65d75a
numpy -> 1.22 to avoid asscalar bug
martinkilbinger Dec 1, 2023
1e7b633
aux script to create links for exposure output runs for tile
martinkilbinger Dec 3, 2023
b006368
Merge remote-tracking branch 'origin/science_portal_run' into exclusive
martinkilbinger Dec 3, 2023
85f0c99
Added aux script to update runs log file
martinkilbinger Dec 3, 2023
d0c3d9f
update runs log file script: deal with multiple runs of same module
martinkilbinger Dec 3, 2023
323d44a
run_log: added function get_all_dirs
martinkilbinger Dec 4, 2023
dedbc3f
Fixed new function get_all_dirs
martinkilbinger Dec 4, 2023
e67f549
Fixed (as for MCCD) FITS key bug
martinkilbinger Dec 4, 2023
55677e7
Merge branch 'exclusive' of github.com:martinkilbinger/shapepipe-1 in…
martinkilbinger Dec 4, 2023
b6cb27d
vignet makers: can use last and all in additional input inage directo…
martinkilbinger Dec 4, 2023
096af60
Dockerfile + jupyter, activate
martinkilbinger Dec 8, 2023
3c37250
file handler raises error if no process
martinkilbinger Dec 8, 2023
667eb7b
combine mask outputs
martinkilbinger Dec 8, 2023
bc20ab2
canfar curl command: added kind (tile, exp) as option
martinkilbinger Dec 13, 2023
1b4b3bf
curl remote job script init_run_exclusive_canfar: command line option…
martinkilbinger Dec 13, 2023
bd82f95
curl local command: added -k kind
martinkilbinger Dec 14, 2023
33ea4a1
summary missing ID 32 fixed (?)
martinkilbinger Dec 15, 2023
50df9a7
canfar scripts command line options
martinkilbinger Dec 15, 2023
ba17ebc
curl canfar local script added job, kind
martinkilbinger Dec 15, 2023
394e464
Merge branch 'exclusive' of github.com:martinkilbinger/shapepipe-1 in…
martinkilbinger Dec 15, 2023
94428b4
Merge pull request #4 from martinkilbinger/science_portal_run
martinkilbinger Dec 15, 2023
9ac9dc1
SP ngmxix (job 128) running on canfar
martinkilbinger Dec 17, 2023
1d25a8b
curl canfar local script updated
martinkilbinger Dec 17, 2023
3d2b127
Merge branch 'exclusive' of github.com:martinkilbinger/shapepipe-1 in…
martinkilbinger Dec 17, 2023
ca6b602
curl scripts updated
martinkilbinger Dec 19, 2023
cf69907
Merge branch 'exclusive' of github.com:martinkilbinger/shapepipe-1 in…
martinkilbinger Dec 19, 2023
c643d0c
run summary more OO
martinkilbinger Dec 19, 2023
523b10f
Merge branch 'exclusive' of github.com:martinkilbinger/shapepipe-1 in…
martinkilbinger Dec 19, 2023
53d9d35
update_runs_log_file script: fixed bug when run dir is empty
martinkilbinger Dec 21, 2023
ce1179e
improved canfar job scripts; fixed some make cat bugs
martinkilbinger Dec 21, 2023
a005119
added curl to Dockerimage
martinkilbinger Dec 21, 2023
64f04cf
Merge remote-tracking branch 'origin/exclusive' into exclusive
martinkilbinger Dec 21, 2023
22ee0f3
Remove temp hack from mask
martinkilbinger Dec 21, 2023
c62861d
Merge branch 'exclusive' of github.com:martinkilbinger/shapepipe-1 in…
martinkilbinger Dec 21, 2023
b682e7c
removed unused code from mask
martinkilbinger Dec 21, 2023
9b9dbf1
Merge pull request #3 from martinkilbinger/exclusive
martinkilbinger Dec 21, 2023
dd57fd8
Merge remote-tracking branch 'origin/develop' into develop
martinkilbinger Dec 21, 2023
7fc3645
curl scripts updated
martinkilbinger Dec 23, 2023
15a4b7b
combine psf validation files: preles now with prepare_tiles_for_final…
martinkilbinger Dec 25, 2023
0d56e23
Update post_processing.md
martinkilbinger Dec 25, 2023
fde5982
prepare tiles script loop tests
martinkilbinger Dec 25, 2023
9c5cad4
Merge branch 'p3' of github.com:martinkilbinger/shapepipe-1 into p3
martinkilbinger Dec 25, 2023
ac0a339
curl canfar local script minor change
martinkilbinger Dec 25, 2023
4048bf1
added vos doc md file
martinkilbinger Dec 25, 2023
0a3f80e
Update post_processing.md
martinkilbinger Dec 25, 2023
d81bdf2
Update vos_retrieve.md
martinkilbinger Dec 25, 2023
672001d
Update vos_retrieve.md
martinkilbinger Dec 25, 2023
cc96a0c
Update vos_retrieve.md
martinkilbinger Dec 25, 2023
87bb2b7
Update vos_retrieve.md
martinkilbinger Dec 25, 2023
76c08a6
Update vos_retrieve.md
martinkilbinger Dec 25, 2023
faa0836
Update vos_retrieve.md
martinkilbinger Dec 25, 2023
85f6d91
Update vos_retrieve.md
martinkilbinger Dec 25, 2023
4f81635
combine runs script renamed
martinkilbinger Dec 25, 2023
5574393
Merge branch 'p3' of github.com:martinkilbinger/shapepipe-1 into p3
martinkilbinger Dec 25, 2023
d4cb47c
Update post_processing.md
martinkilbinger Dec 25, 2023
2ffba3b
P3 proceesing to final cat
martinkilbinger Dec 26, 2023
67c966c
Merge branch 'p3' of github.com:martinkilbinger/shapepipe-1 into p3
martinkilbinger Dec 26, 2023
efb2799
Merge branch 'develop' into p3
martinkilbinger Dec 26, 2023
1f36bf5
Merge pull request #5 from martinkilbinger/p3
martinkilbinger Dec 26, 2023
9f81502
config files updated
martinkilbinger Jan 6, 2024
6eb11cf
PSFEx interp runner: allowing all: for ME_DOT_PSF_PDIRS
martinkilbinger Jan 15, 2024
485da58
init run exc script: added -d option; updates
martinkilbinger Jan 15, 2024
ef3a2c9
job sp canfar script: remove old vos upload code
martinkilbinger Jan 15, 2024
a20cb4f
summary create library and param files
martinkilbinger Jan 15, 2024
29b463b
minor changes
martinkilbinger Jan 15, 2024
cb67e8f
curl local script: now working with -e ID and -f file_IDs, in dry and…
martinkilbinger Jan 15, 2024
f0acd65
summary: fixed main path, verbose
martinkilbinger Jan 16, 2024
1bc602b
Started canfar howto
martinkilbinger Jan 16, 2024
d6ff437
Added summary run notebook
martinkilbinger Jan 16, 2024
1a81ae3
psfex_interp: continue instead of error if one of the .psf files not …
martinkilbinger Jan 17, 2024
93d6c6e
fixed symlink config files
martinkilbinger Jan 17, 2024
9c0b9a5
Updated summary run
martinkilbinger Jan 17, 2024
b19ad03
revert to main psfex in link exp for tiles script
martinkilbinger Jan 17, 2024
af38556
curl job script: remoging session logs
martinkilbinger Jan 17, 2024
8c9921f
comments
martinkilbinger Jan 17, 2024
18d104c
Merge pull request #6 from martinkilbinger/P7
martinkilbinger Jan 17, 2024
4276fea
Update canfar.md
martinkilbinger Jan 19, 2024
3f15533
Update canfar.md
martinkilbinger Jan 19, 2024
cfefcfb
Update canfar.md
martinkilbinger Jan 19, 2024
24480e2
Update canfar.md
martinkilbinger Jan 19, 2024
48e6114
Merge pull request #8 from martinkilbinger/martinkilbinger-patch-1
martinkilbinger Jan 19, 2024
cd7c61b
Merge pull request #7 from martinkilbinger/martinkilbinger-canfar-doc
martinkilbinger Jan 19, 2024
9a964c5
updated canfar doc
martinkilbinger Jan 26, 2024
e0100ca
script with akaha lib to count headlerss jobs
martinkilbinger Jan 26, 2024
984ec90
cleaned up curl submit script
martinkilbinger Jan 26, 2024
842e382
minor modifs to summary
martinkilbinger Jan 26, 2024
d9846e9
Removed VM_HOME; jon sp canfar cleaned up
martinkilbinger Jan 26, 2024
c5deb34
Dockerfile cleand up
martinkilbinger Jan 30, 2024
d507780
summary params minor bug fixed
martinkilbinger Feb 1, 2024
b4e0aa0
major bugx fixed: N_SMP was n_SMP, not propagated
martinkilbinger Feb 1, 2024
f8a07d7
major bugx fixed: N_SMP was n_SMP, not propagated
martinkilbinger Feb 1, 2024
30116b8
summary nb
martinkilbinger Feb 1, 2024
9e44fa6
sumamry updated
martinkilbinger Feb 11, 2024
3ab923f
terminal title from within curl script
martinkilbinger Feb 11, 2024
ee5b3ad
Update tiles_P7.txt
martinkilbinger Feb 11, 2024
79cb00a
Merge pull request #9 from martinkilbinger/P7
martinkilbinger Feb 11, 2024
92e4308
merged Dockerfile from docker_image
martinkilbinger Feb 11, 2024
1d928d4
monitoring and job handling scripts; small modifs, output; canfar pip…
martinkilbinger Feb 23, 2024
403e8c5
Merge pull request #10 from martinkilbinger/curl
martinkilbinger Feb 23, 2024
a6d8b52
combine run script: flag_tile and flag_exp as diff options
martinkilbinger Mar 5, 2024
1a2d47d
mask runer excluding processed files working
martinkilbinger Mar 6, 2024
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
Prev Previous commit
Next Next commit
P3 proceesing to final cat
  • Loading branch information
martinkilbinger committed Dec 26, 2023
commit 2ffba3b486afac805100caf98fa61f35461c2b47
4 changes: 2 additions & 2 deletions example/cfis/config_MsPl_psfex.ini
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ LOG_NAME = log_sp
RUN_LOG_NAME = log_run_sp

# Input directory, containing input files, single string or list of names
INPUT_DIR = $SP_RUN/psf_validation_ind
INPUT_DIR = $SP_RUN/output

# Output directory
OUTPUT_DIR = $SP_RUN/output
Expand All @@ -54,7 +54,7 @@ TIMEOUT = 96:00:00
## Module options
[MERGE_STARCAT_RUNNER]

INPUT_DIR = psf_validation_ind
INPUT_DIR = last:psfex_interp_runner

PSF_MODEL = psfex

Expand Down
68 changes: 68 additions & 0 deletions example/cfis/config_Ms_psfex.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# ShapePipe configuration file for post-processing.
# merge star cat.


## Default ShapePipe options
[DEFAULT]

# verbose mode (optional), default: True, print messages on terminal
VERBOSE = True

# Name of run (optional) default: shapepipe_run
RUN_NAME = run_sp_Ms

# Add date and time to RUN_NAME, optional, default: False
RUN_DATETIME = False


## ShapePipe execution options
[EXECUTION]

# Module name, single string or comma-separated list of valid module runner names
MODULE = merge_starcat_runner

# Parallel processing mode, SMP or MPI
MODE = SMP


## ShapePipe file handling options
[FILE]

# Log file master name, optional, default: shapepipe
LOG_NAME = log_sp

# Runner log file name, optional, default: shapepipe_runs
RUN_LOG_NAME = log_run_sp

# Input directory, containing input files, single string or list of names
INPUT_DIR = $SP_RUN/output

# Output directory
OUTPUT_DIR = $SP_RUN/output


## ShapePipe job handling options
[JOB]

# Batch size of parallel processing (optional), default is 1, i.e. run all jobs in serial
SMP_BATCH_SIZE = 4

# Timeout value (optional), default is None, i.e. no timeout limit applied
TIMEOUT = 96:00:00


## Module options
[MERGE_STARCAT_RUNNER]

INPUT_DIR = last:psfex_interp_runner

PSF_MODEL = psfex

NUMBERING_SCHEME = -0000000-0

# Input file pattern(s), list of strings with length matching number of expected input file types
# Cannot contain wild cards
FILE_PATTERN = validation_psf

# FILE_EXT (optional) list of string extensions to identify input files
FILE_EXT = .fits
8 changes: 6 additions & 2 deletions scripts/sh/combine_runs.bash
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,11 @@ run_out="run_sp_combined_$cat"

if [ "$cat" == "final" ]; then

run_in="$pwd/$out_base/run_sp_Mc_*"
# v1
#run_in="$pwd/$out_base/run_sp_Mc_*"
# v2
run_in="$pwd/tile_runs/*/$out_base/run_sp_Mc_*"

module="make_catalog_runner"
pattern="final_cat-*"

Expand All @@ -120,7 +124,7 @@ elif [ "$cat" == "psf" ]; then
# v1
#run_in="$pwf/$out_base/run_sp_exp_Pi_*"
# v2
run_in="$pwd/exp_runs/*/$out_base/"
run_in="$pwd/exp_runs/*/$out_base/run_sp_exp_Pi_*"

pattern="validation_psf-*"
if [ "$psf" == "psfex" ]; then
Expand Down
11 changes: 3 additions & 8 deletions scripts/sh/job_sp_canfar.bash
Original file line number Diff line number Diff line change
Expand Up @@ -161,10 +161,10 @@ export SP_RUN=`pwd`
export SP_CONFIG=$SP_RUN/cfis
export SP_CONFIG_MOD=$SP_RUN/cfis_mod

## Other variables
# To find ssl certificate
export VM_HOME=$HOME

# Input tile numbers ASCII file
export TILE_NUMBERS_PATH=tile_numbers.txt
## Other variables

# Output
OUTPUT=$SP_RUN/output
Expand Down Expand Up @@ -326,11 +326,6 @@ mkdir -p $SP_CONFIG_MOD

# Processing

## Check for input tile list
#if [ ! -e $TILE_NUMBERS_PATH ]; then
#echo "Tile numbers file $TILE_NUMBERS_PATH not found, exiting"
#fi

### Retrieve config files
if [[ $config_dir == *"vos:"* ]]; then
command_sp "$VCP $config_dir ." "Retrieve shapepipe config files"
Expand Down
4 changes: 0 additions & 4 deletions shapepipe/utilities/summary.py
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,6 @@ def get_names_in_dir(self, iterable, module, idx):
f"{self._path_left}/{subdir}/"
+ f"{self._path_right[idx]}"
)
print("MKDEBUG ", base_and_subdir)
if os.path.isdir(base_and_subdir):

matches = []
Expand All @@ -511,10 +510,8 @@ def get_names_in_dir(self, iterable, module, idx):
with os.scandir(base_and_subdir) as entries:
for entry in entries:

print("MKDEBUG ", entry, self._run_dir[idx])
# Append directory name if matches module
if entry.name.startswith(self._run_dir[idx]):
print("MKDEBUG matches")
matches.append(entry)

# This entry does not match module -> next
Expand All @@ -529,7 +526,6 @@ def get_names_in_dir(self, iterable, module, idx):
directory = self.get_module_output_dir(
full_path, module
)
print("MKDEBUG ", directory)

# Find matching file names and paths
self.get_matches_final(directory, idx)
Expand Down