No project description provided
Project description
FixMS
WARNING FOR USERS: These scripts are still being verified for complete correctness. Please use at your own risk.
ASKAP utilities for updating MeasurementSets for external imagers.
ASKAP MSs are produced in a way that breaks compatibility with most other imagers (e.g. CASA, WSclean). Here we provide two modules (with CLI hooks) that perform the fixes that need to be applied in order to produce astronomically correct imagers with non-YandaSoft imagers:
-
fix_ms_dir: ASKAP MeasurementSets are phased towards the centre of field, but not the centre of its given beam. This utility reads the appropriate offsets to the beam centre from theBEAM_OFFSETand updates theFIELDtable, as well as the phase and delay reference columns. An option is also available to restore theFIELDtable directions to the original directions iffix_ms_dirhas already been run.BEAM_OFFSETis also restored with this option. -
fix_ms_corrs: ASKAP MeasurementSets, as calibrated by the obervatory, provide correlations in the instrument frame. ASKAP has a unique 'roll' axis which means, in principle, the instrument frame can be at any arbitrary rotation on the sky. This utility applies the appropriate rotation matrix to the visibilities such the 'X' is aligned North-South and 'Y' is aligned East-West (IAU convention). Further, ASKAPsoft defines Stokes I as $I=XX+YY$, whereas most other telescopes use $I=\frac{1}{2}(XX+YY)$ (note this also applies to all other Stokes parameters). This factor is also corrected for here at the same time as the rotation. If you have calibrated with non-ASKAPsoft tools, you may need to use the--no-fix-stokes-factoroption, which will disable the factor of two correction and just do a rotation.
For convenience, we also provide fix_ms which does both of the above!
Full documentation on Read The Docs.
Installation
Obtain and install Python 3 (I recommend Miniforge or Miniconda).
Install the Python scripts:
Latest:
pip install git+https://github.com/AlecThomson/FixMS.git
Stable:
pip install FixMS
Usage
NOTE: If running on large MeasurementSets pay attention to the 'chunksize' and 'max-chunks' arguments. These are used to balance memory usage and the disk I/O. You may need to adjust these parameters to achieve maximum speed on your hardware.
❯ fix_ms -h
usage: fix_ms [-h] [--chunksize CHUNKSIZE] [--max-chunks MAX_CHUNKS] [--data-column DATA_COLUMN] [--corrected-data-column CORRECTED_DATA_COLUMN] [--no-fix-stokes-factor] [ms]
Utility to correct the ASKAP beam positions and apply a rotation to apply a change of the reference frame of the visibilities
positional arguments:
ms Measurement set to update (default: None)
optional arguments:
-h, --help show this help message and exit
--chunksize CHUNKSIZE
The chunksize to use when reading the MS (default: 1000)
--max-chunks MAX_CHUNKS
The maximum number of chunks to process at once (default: 1000)
--data-column DATA_COLUMN
The column to fix (default: DATA)
--corrected-data-column CORRECTED_DATA_COLUMN
The column to write the corrected data to (default: CORRECTED_DATA)
--no-fix-stokes-factor
Don't fix the Stokes factor. Use this if you have *not* used ASKAPsoft. If you have used ASKAPsoft, you should leave this option alone. (default: False)
❯ fix_ms_corrs -h
usage: fix_ms_corrs [-h] [--chunksize CHUNKSIZE] [--max-chunks MAX_CHUNKS] [--data-column DATA_COLUMN] [--corrected-data-column CORRECTED_DATA_COLUMN] [--no-fix-stokes-factor] ms
Fix the correlation rotation of ASKAP MSs. Converts the ASKAP standard correlations to the 'standard' correlations This will make them compatible with most imagers (e.g. wsclean, CASA) The
new correlations are placed in a new column called 'CORRECTED_DATA'
positional arguments:
ms The MS to fix
optional arguments:
-h, --help show this help message and exit
--chunksize CHUNKSIZE
The chunksize to use when reading the MS (default: 1000)
--max-chunks MAX_CHUNKS
The maximum number of chunks to process at once (default: 1000)
--data-column DATA_COLUMN
The column to fix (default: DATA)
--corrected-data-column CORRECTED_DATA_COLUMN
The column to write the corrected data to (default: CORRECTED_DATA)
--no-fix-stokes-factor
Don't fix the Stokes factor. Use this if you have *not* used ASKAPsoft. If you have used ASKAPsoft, you should leave this option alone. (default: False)
❯ fix_ms_dir -h
usage: fix_ms_dir [-h] [ms]
ASKAP utility - update the pointing centre of a beam in an MS. - Allows imaging by CASA or wsclean.
positional arguments:
ms Measurement set to update (default: None)
options:
-h, --help show this help message and exit
-r, --restore Switch to restore direction to the original ASKAPsoft pipeline direction. (default: False)
Contribution
Contributions are very welcome! Please open an issue first to discuss any bugs or updates you might have.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fixms-0.4.1.tar.gz.
File metadata
- Download URL: fixms-0.4.1.tar.gz
- Upload date:
- Size: 16.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
695c8ca7fc3b1a05dc911508d2fccc0782cfc0c41d91125c954e1312fe3959ec
|
|
| MD5 |
3683994fde8a95bd551af1f049a7b673
|
|
| BLAKE2b-256 |
9afb2fce3430f2c6bbb03a997dec70bb632a63fbff6f815493ab7a17d2c03057
|
Provenance
The following attestation bundles were made for fixms-0.4.1.tar.gz:
Publisher:
publish.yml on AlecThomson/FixMS
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
fixms-0.4.1.tar.gz -
Subject digest:
695c8ca7fc3b1a05dc911508d2fccc0782cfc0c41d91125c954e1312fe3959ec - Sigstore transparency entry: 204602753
- Sigstore integration time:
-
Permalink:
AlecThomson/FixMS@215cf63589a673a55095f4f9502242f1515678ef -
Branch / Tag:
refs/tags/v0.4.1 - Owner: https://github.com/AlecThomson
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@215cf63589a673a55095f4f9502242f1515678ef -
Trigger Event:
release
-
Statement type:
File details
Details for the file fixms-0.4.1-py3-none-any.whl.
File metadata
- Download URL: fixms-0.4.1-py3-none-any.whl
- Upload date:
- Size: 18.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8b8158be383688a26c5034c00e9b31131d10a8b8aad9c8b20617953830c3c828
|
|
| MD5 |
aa4cfcb7314773c7196d7fa9c2130636
|
|
| BLAKE2b-256 |
2bdef115c20682d261b7c8e9a9d25526f3a9df2314a8c09994ca1a2298614578
|
Provenance
The following attestation bundles were made for fixms-0.4.1-py3-none-any.whl:
Publisher:
publish.yml on AlecThomson/FixMS
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
fixms-0.4.1-py3-none-any.whl -
Subject digest:
8b8158be383688a26c5034c00e9b31131d10a8b8aad9c8b20617953830c3c828 - Sigstore transparency entry: 204602755
- Sigstore integration time:
-
Permalink:
AlecThomson/FixMS@215cf63589a673a55095f4f9502242f1515678ef -
Branch / Tag:
refs/tags/v0.4.1 - Owner: https://github.com/AlecThomson
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@215cf63589a673a55095f4f9502242f1515678ef -
Trigger Event:
release
-
Statement type: