psimager
Fast dirty imaging of measurement sets for power spectrum analyses: dirty Stokes and PSF images with the ducc0 w-gridder, with the options, file names and FITS keywords of WSClean, so that pspipe and ps_eor read them as WSClean images.
The MSs are read once, in large row chunks, and the output channels are gridded in parallel, each by one ducc0 call. Imaging many channels is then many times faster than with WSClean, which reorders the data on disk and grids one image at a time.
Installation
pip install psimager
Usage
psimager -name img -size 400 400 -scale 6amin -pol IV -channels-out 363 -weight natural \
-minuv-l 5 -maxuv-l 100 -data-column CORRECTED_DATA -even-odd -make-psf -no-dirty obs*.MS
writes img-even-0000-I-image.fits, img-even-0000-V-image.fits, img-even-0000-psf.fits, ...,
for each output channel, for the even and the odd time steps.
Options
As WSClean's: -name, -data-column, -pol, -size, -scale, -channel-range,
-channels-out, -interval, -intervals-out, -even-timesteps, -odd-timesteps, -minuv-l,
-maxuv-l, -minuvw-m, -maxuvw-m, -weight natural|uniform|briggs ROBUST,
-visibility-weighting-mode, -taper-edge, -padding (of the weighting grid),
-wgridder-accuracy, -j, -parallel-gridding, -mem, -abs-mem, -make-psf, -no-dirty.
See psimager --help.
Differences with WSClean:
-even-oddimages the even and the odd time steps in one pass, asNAME-even-*andNAME-odd-*.-fits-keyword KEY=VALUE(repeatable) adds a header keyword to every output file, written with the file instead of updating it afterwards.-parallel-griddingdefaults to-j: one thread per output channel, which is the fastest.- No deconvolution and no
-MFS-images. - WSClean's gridding options (
-oversampling,-kernel-size,-nwlayers,-grid-mode,-reorder,-temp-dir, ...) are accepted and ignored, with a warning, so that a WSClean command line runs unchanged. - Only single-field, single-SPW MSs with linear correlations.
The data are read in chunks of at most 30 GB by default (-abs-mem), or -mem % (33) of the
node's memory if smaller, so that several psimager runs can share a node, e.g. as job steps of
a Slurm allocation; give -abs-mem to use more on a node of its own.
Images are in Jy/PSF (the PSF peaks at 1), one file per output channel and Stokes parameter, with
WSClean's WSCNVIS, WSCENVIS, WSCVWSUM, WSCIMGWG and WSCNORMF computed from the Stokes I
weights, and BMAJ, BMIN, BPA fitted to the PSF.
Image cubes (-cube)
With -cube, the output channels of an image go in one file, on its third axis: one file per
parity, interval and product, NAME[-even|-odd][-tNNNN][-I|-V]-image.fits and
NAME[-even|-odd][-tNNNN]-psf.fits. A few files instead of one per channel: on a parallel file
system, opening a file costs more than reading it.
The channels are often unevenly spaced (e.g. the flagged edge channels of each subband removed),
which a linear FITS axis cannot describe; the standard tabular axis (FREQ-TAB) can, but CASA
does not read it. The cubes therefore have:
-
Primary HDU: the images,
NAXIS3= number of output channels. The frequency axis is linear, from the first to the last channel (CRPIX3 = 1,CRVAL3the first frequency,CDELT3the mean spacing): exact for evenly spaced channels, approximate otherwise, for viewers. The keywords common to all channels are in the header (WSCDATAC,WSCWEIGH,WSCCHANS,WSCCHANE,PSIVERSI,-fits-keyword); the per-channel ones are in the tables. -
CHANNELSextension, one row per output channel, the reference for the frequencies:Column Format Unit CHAN1Joutput channel, from 0 FREQ1DHz centre: mean of the input channel frequencies CHWIDTH1DHz sum of the input channel widths WSCNVIS,WSCENVIS,WSCVWSUM,WSCIMGWG,WSCNORMF1Das the keywords of WSClean -
BEAMSextension (with-make-psf), CASA's per-channel beams, read by CASA, spectral-cube and radio-beam: columnsBMAJ,BMIN(1E, arcsec),BPA(1E, deg; NaN where the PSF fit failed),CHAN,POL(1J, from 0;POL= 0), keywordsNCHAN,NPOL= 1, andCASAMBM = Tin the primary header. It is the first extension, beforeCHANNELS: withCASAMBM, CASA reads the beams from the first extension.
The tables are the same in the files of an image (Stokes parameters and PSF): the statistics come
from the Stokes I weights, the beams from the PSF. A channel without visibilities is a zero
plane, with a zero beam and zero statistics. With -channels-out 1, -cube changes nothing.
psimager-cube OUTPUT FILE... writes the single-channel files of an image (psimager or WSClean)
as such a cube, in frequency order; their keywords other than the per-channel ones must be the
same.
Metadata
Release files for psimager 0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| psimager-0.4.tar.gz | 29.7 kB | Without provenance | Details for psimager-0.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| psimager-0.4-py3-none-any.whl | Python 3 | none | any | Details for psimager-0.4-py3-none-any.whl |
Total release size: 60.0 kB
Release files / psimager-0.4.tar.gz
| Download URL | psimager-0.4.tar.gz |
|---|---|
| Size | 29.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
185de61f8b7ba0503d2c18a447ac2c43a661810ce9d52503d1a2164805599bd5
|
|
BLAKE2b-256 checksum How to use checksums |
4bde420c20d05db7e7c4d2a987c1912c29481ad3a8411449513f5726503d961c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.4.1 CPython/3.14.4 Linux/7.0.0-38-generic
|
Release files / psimager-0.4-py3-none-any.whl
| Download URL | psimager-0.4-py3-none-any.whl |
|---|---|
| Size | 30.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
dc53a08f0026f71406e9b096b05ff9c060a247a0eedd4746f7b45b9b52175cf4
|
|
BLAKE2b-256 checksum How to use checksums |
7990f5f678bb1cafade92255ad025cd74321a7369f30651485ac2dea46974379
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.4.1 CPython/3.14.4 Linux/7.0.0-38-generic
|
Security for psimager 0.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.