Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Uddeepta Deka
/
Updated Charged Lens
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
0fef33e6
authored
Oct 25, 2024
by
Uddeepta Deka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
check unfinished jobs script added
parent
cb93d558
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
61 additions
and
2 deletions
.gitignore
notebooks/plotting.ipynb
scripts/check_unfinished_jobs.py
scripts/find_non_zero_error_files.sh
scripts/gen_params.py
.gitignore
View file @
0fef33e6
...
...
@@ -4,3 +4,4 @@ __pycache__/
notebooks/test.ipynb
data/
scripts/params.txt
scripts/unfinished_jobs.txt
notebooks/plotting.ipynb
View file @
0fef33e6
...
...
@@ -62,7 +62,7 @@
" return Ft_data, Fw_data\n",
"\n",
"def fetch_condor_data(folder_path, **kwargs):\n",
" filetag = 'y_%.3f_q_%.
3f
_Ml_%.1f_zl_%.1f_dect_%s_fhi_%.1f_zs_%.1f_m1_%.1f_m2_%.1f_approx_%s_deltaf_%.5f_tmax_%.1f_dtfac_%.1f'%(\n",
" filetag = 'y_%.3f_q_%.
1e
_Ml_%.1f_zl_%.1f_dect_%s_fhi_%.1f_zs_%.1f_m1_%.1f_m2_%.1f_approx_%s_deltaf_%.5f_tmax_%.1f_dtfac_%.1f'%(\n",
" kwargs['y'], kwargs['q'], kwargs['Ml'], kwargs['zl'], kwargs['dect'], kwargs['f_hi'], kwargs['zs'], kwargs['m1'], kwargs['m2'],\n",
" kwargs['approx'], kwargs['delta_f'], kwargs['t_max'], kwargs['dt_fac'])\n",
" outdir = folder_path+filetag+\"/\"\n",
scripts/check_unfinished_jobs.py
0 → 100644
View file @
0fef33e6
import
os
# Define the template for the runtag
runtag_template
=
'y_
%.3
f_q_
%.1
e_Ml_
%.1
f_zl_
%.1
f_dect_
%
s_fhi_
%.1
f_zs_
%.1
f_m1_
%.1
f_m2_
%.1
f_approx_
%
s_deltaf_
%.5
f_tmax_
%.1
f_dtfac_
%.1
f'
# Values for fixed parameters (adjust as necessary)
kwargs
=
{
"Ml"
:
100.0
,
"zl"
:
0.5
,
"dect"
:
"ET"
,
"f_hi"
:
1024.0
,
"zs"
:
2.0
,
"m1"
:
20.0
,
"m2"
:
20.0
,
"approx"
:
"IMRPhenomXP"
,
"delta_f"
:
1.
/
32
,
"t_max"
:
200.
,
"dt_fac"
:
7.5
}
# File containing all the parameter combinations
param_file
=
"params.txt"
# Directory where the jobs are stored
job_directory
=
"/home1/uddeepta.deka/lensing/charged_lens_updated/data/lensed_waveform_data/results"
# File to store the unfinished jobs
output_file
=
"unfinished_jobs.txt"
# List to store unfinished jobs
unfinished_jobs
=
[]
# Open and read the parameter file
with
open
(
param_file
,
'r'
)
as
f
:
for
line
in
f
:
# Parse the y, q values from the line
y
,
q
=
map
(
float
,
line
.
split
())
# Generate the expected runtag folder name
runtag
=
runtag_template
%
(
y
,
q
,
kwargs
[
'Ml'
],
kwargs
[
'zl'
],
kwargs
[
'dect'
],
kwargs
[
'f_hi'
],
kwargs
[
'zs'
],
kwargs
[
'm1'
],
kwargs
[
'm2'
],
kwargs
[
'approx'
],
kwargs
[
'delta_f'
],
kwargs
[
't_max'
],
kwargs
[
'dt_fac'
])
# Check if the folder exists in the job directory
job_folder
=
os
.
path
.
join
(
job_directory
,
runtag
)
if
not
os
.
path
.
exists
(
job_folder
)
or
not
os
.
listdir
(
job_folder
):
# If the folder doesn't exist, store the y, q values
#print(job_folder)
unfinished_jobs
.
append
((
y
,
q
))
# Save the unfinished jobs to the output file
with
open
(
output_file
,
'w'
)
as
f
:
for
y
,
q
in
unfinished_jobs
:
f
.
write
(
f
"{y} {q}
\n
"
)
print
(
f
"Unfinished jobs have been saved to {output_file}"
)
scripts/find_non_zero_error_files.sh
0 → 100644
View file @
0fef33e6
#!/bin/bash
# Directory to search for error files
# You can modify this to the directory where your error files are stored
DIR_TO_SEARCH
=
"/home1/uddeepta.deka/lensing/charged_lens_updated/data/lensed_waveform_data/errors/"
# Find all .err files with non-zero size
echo
"Finding all non-zero size error files in
$DIR_TO_SEARCH
..."
find
"
$DIR_TO_SEARCH
"
-type
f
-name
"*.err"
-size
+0c
scripts/gen_params.py
View file @
0fef33e6
...
...
@@ -8,7 +8,7 @@ import numpy as np
# Define your range for y_value and Ml_value
y_values
=
[
0.1
,
0.5
,
1.0
]
q_values
=
[
1
,
1e-3
,
1e-6
,
1e-9
,
1e-11
,
0
]
q_values
=
[
0.
1
,
1e-3
,
1e-6
,
1e-9
,
1e-11
,
0
]
# Write to a parameter file
with
open
(
'params.txt'
,
'w'
)
as
f
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment