fit_shamfi.py¶
A script to fit a shapelet model consistent with the RTS or WODEN
usage: fit_shamfi.py [-h] [--rts_srclist] [--woden_srclist] [--no_srclist]
[--fits_file FITS_FILE] [--b1s B1S] [--b2s B2S]
[--nmax NMAX] [--save_tag SAVE_TAG]
[--plot_lims PLOT_LIMS] [--freq FREQ]
[--already_jy_per_pixel] [--edge_pad EDGE_PAD]
[--num_beta_values NUM_BETA_VALUES]
[--exclude_box EXCLUDE_BOX] [--fit_box FIT_BOX]
[--plot_resid_grid] [--plot_initial_gaussian_fit]
[--plot_edge_pad] [--compress COMPRESS]
[--ignore_negative] [--max_baseline MAX_BASELINE]
[--version] [--cite]
Named Arguments¶
| --rts_srclist | Just save an RTS style srclist - default is to saving both RTS and WODEN srclists Default: False |
| --woden_srclist | |
Just save a WODEN style srclist - default is to saving both RTS and WODEN srclists Default: False | |
| --no_srclist | Do not save any srclists Default: False |
| --fits_file | Name of fits file to fit data from Default: False |
| --b1s | The beta scale range along the major axis (arcmins). Enter as a lower and upper bound separated by a comma, eg 2,10 Default: False |
| --b2s | The beta scale along the minor (arcmins). Enter as a lower and upper bound separated by a comma, eg 2,10 Default: False |
| --nmax | Maximum value of n1 to include in the basis functions - current maximum possible in the RTS is 100 (The bigger the n1, the higher the resolution of the fitted model) Default: 10 |
| --save_tag | A tag to name the outputs with - defaults to “model” Default: “model” |
| --plot_lims | Flux limits for the plot - enter as vmin,vmax. Default is min(image),max(image) Default: False |
| --freq | Frequency (Hz) of the image - defaults to looking for keyword FREQ and associated value Default: “from_FITS” |
| --already_jy_per_pixel | |
Add to NOT convert pixels from Jy/beam into Jy/pixel Default: False | |
| --edge_pad | Add empty pixels outside image to stop fitting artefacts outside the desired image - defaults to 0 pixels. Set to desired amount using –edge_pad=number. Default: 0 |
| --num_beta_values | |
Num of beta params fit over ranges –b1s and –b2s Default: 5 | |
| --exclude_box | Any number of areas to exclude from the fit. Specify by user pixel numbers. Add each box as as: x_low,x_high,y_low,y_high. For example, to exclude to areas, one between 0 to 10 in the x range, 10 to 20 in the y range, and the other between 100 to 400 in the x range, 300 to 455 in the y range, enter this on the command line: fit_shapelets.py –exclude_box 0,10,10,20 –exclude_box 100,400,300,455 |
| --fit_box | Only fit shapelets to data within the designated box. Add as x_low,x_high,y_low,y_high Default: False |
| --plot_resid_grid | |
Add to plot the residuals matrix found for all values of b1 and b2 Default: False | |
| --plot_initial_gaussian_fit | |
Add to plot the intial gaussian fit used to fine b1 and b2 Default: False | |
| --plot_edge_pad | |
When plotting fit results, also plot the fit with an edge pad to check the fit outside the image Default: False | |
| --compress | Add a list of comma separated percentage compression values to apply to the data, e.g. –compress=90,80,70 Default: False |
| --ignore_negative | |
Add to ignore all negative pixels in image during the fit Default: False | |
| --max_baseline | If no restoring beam information available, use this maximum baseline length in conjunction with the frequency to calculate a resolution to set BMAJ and BMIN Default: 3000.0 |
| --version | Prints the version info and exits Default: False |
| --cite | Prints a bibtex entry for citing this work (well it will once the paper is published) Default: False |