Skip to content

Commit

Permalink
Docs
Browse files Browse the repository at this point in the history
  • Loading branch information
AlecThomson committed Apr 3, 2024
1 parent d6f8f48 commit 0eeae66
Show file tree
Hide file tree
Showing 4 changed files with 310 additions and 212 deletions.
140 changes: 93 additions & 47 deletions arrakis/.default_config.cfg
Original file line number Diff line number Diff line change
@@ -1,56 +1,102 @@
# Arrakis default config
[General options]
# host: # Host of mongodb.
# username: # Username of mongodb.
# password: # Password of mongodb.
# dask_config: # Config file for Dask SlurmCLUSTER.
# holofile:
yanda: "1.3.0"

[Flow options]

## Note 'None' will be interpreated as a string, not a NoneType
## If you want to use the default value, just leave the line blank

[Imaging options]
# temp_dir: None
# psf_cutoff: None
robust: -0.5
nchan: 36
pols: 'IQU'
size: 4096
scale: 2.5
mgain: 0.8
niter: 100000
# nmiter: None
auto_mask: 3.0
auto_threshold: 1.0
local_rms: False
# local_rms_window: None
# force_mask_rounds: None
# gridder: None
# taper: None
minuv: 0.0
# parallel: None
purge: False
mpi: False
multiscale: False
# multiscale_scale_bias: None
multiscale_scales: '0,2,4,8,16,32,64,128'
# absmem: None
make_residual_cubes: False
ms_glob_pattern: 'scienceData*_averaged_cal.leakage.ms'
data_column: 'CORRECTED_DATA'
no_mf_weighting: False
skip_fix_ms: False
hosted-wsclean: 'docker://alecthomson/wsclean:latest'
# local_wsclean: None

[Pipeline options]
# config: None
epoch: 0
# host: None
# username: None
# password: None
# dask_config: None
# imager_dask_config: None
# holofile: None
yanda: '1.3.0'
# yanda_image: None
imager_only: False
skip_imager: False
skip_cutout: False
skip_linmos: False
skip_cleanup: False
skip_frion: False
skip_rmsynth: False
skip_rmclean: False
skip_cat: False

[Output options]
verbose: True # Verbose output
verbose_worker: False # Verbose worker output
verbose: False

[Cutout options]
pad: 3 # Number of beamwidths to pad around source
dryrun: False # Do a dry-run

[RM-synth/CLEAN options]
dimension: 1d # How many dimensions for RMsynth [1d] or '3d'
database: True # Add RMsynth data to MongoDB
# tt0: # TT0 MFS image -- will be used for model of Stokes I -- also needs --tt1.
# tt1: # TT1 MFS image -- will be used for model of Stokes I -- also needs --tt0.
validate: False # Run on RMsynth Stokes I
# limit: # Limit number of sources
own_fit: False # Use own fit for RMsynth Stokes I

[RM-tools options]
savePlots: False # save the plots
weightType: variance # weighting [uniform] (all 1s) or 'variance'
fit_function: log # Stokes I fitting function
fitRMSF: True # Fit a gaussian to the RMSF
# phiMax_radm2: # Absolute max Faraday depth sampled (overrides NSAMPLES)
# dPhi_radm2: # Width of Faraday depth channel
nSamples: 5 # Number of samples across the FWHM RMSF
polyOrd: -3 # polynomial order to fit to I spectrum
noStokesI: False # ignore the Stokes I spectrum
showPlots: False # show the plots
not_RMSF: False # Skip calculation of RMSF
rm_verbose: False # Verbose RMsynth/CLEAN
debug: False # turn on debugging messages & plots
cutoff: -3 # CLEAN cutoff (+ve = absolute, -ve = sigma)
maxIter: 10000 # maximum number of CLEAN iterations
gain: 0.1 # CLEAN loop gain
window: False # use a windowed CLEAN

[Catalogue options]
# outfile: # File to save table to
format: fits # Format for output file
pad: 5
dryrun: False

[RMsynth options]
dimension: '1d'
database: False
# tt0: None
# tt1: None
validate: False
# limit: None
own_fit: False
savePlots: False
weightType: 'variance'
fit_function: 'log'
fitRMSF: False
# phiMax_radm2: None
# dPhi_radm2: None
nSamples: 5
polyOrd: 3
noStokesI: False
showPlots: False
not_RMSF: False
rm_verbose: False
debug: False

[RMclean options]
cutoff: -3
maxIter: 10000
gain: 0.1
# window: None

[FRion options]
ionex_server: 'ftp://ftp.aiub.unibe.ch/CODE/'
ionex_prefix: 'codg'
# ionex_proxy_server: None
# ionex_formatter: None
ionex_predownload: False

[Catalog options]
# outfile: None
4 changes: 2 additions & 2 deletions arrakis/process_region.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from prefect import flow

from arrakis import makecat, merge_fields, process_spice, rmclean_oncuts, rmsynth_oncuts
from arrakis.logger import logger
from arrakis.logger import UltimateHelpFormatter, logger
from arrakis.utils.database import test_db
from arrakis.utils.pipeline import logo_str

Expand Down Expand Up @@ -164,7 +164,7 @@ def cli():
parser = configargparse.ArgParser(
default_config_files=[".default_field_config.txt"],
description=descStr,
formatter_class=configargparse.ArgumentDefaultsHelpFormatter,
formatter_class=UltimateHelpFormatter,
)
parser.add("--config", required=False, is_config_file=True, help="Config file path")

Expand Down
7 changes: 4 additions & 3 deletions arrakis/process_spice.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
rmclean_oncuts,
rmsynth_oncuts,
)
from arrakis.logger import logger
from arrakis.logger import UltimateHelpFormatter, logger
from arrakis.utils.database import test_db
from arrakis.utils.pipeline import logo_str

Expand Down Expand Up @@ -343,9 +343,9 @@ def cli():

# Parse the command line options
parser = configargparse.ArgParser(
default_config_files=[".default_config.txt"],
default_config_files=[".default_config.cfg"],
description=descStr,
formatter_class=configargparse.ArgumentDefaultsHelpFormatter,
formatter_class=UltimateHelpFormatter,
parents=[imager_parser],
)
parser.add("--config", required=False, is_config_file=True, help="Config file path")
Expand Down Expand Up @@ -631,6 +631,7 @@ def cli():
"--outfile", default=None, type=str, help="File to save table to [None]."
)
args = parser.parse_args()

parser.print_values()

verbose = args.verbose
Expand Down
Loading

0 comments on commit 0eeae66

Please sign in to comment.