-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to call the number of scans from the MS to the outputvis? #18
Comments
Problem is here: for_loop:
var: myscan
over: ms You should set it to
Glad you brought this up because splitting scan by
I recall this working previously when I tried it a while back in the pipeline, so not sure whats gone wrong. |
I'm also having the same problem when set the default to all, when It works
give me only one MS with all scans, meaning that it's not really splitting.
I think the other option is to use the python script we used before.
…On Tue, 22 Nov 2022, 00:08 Kincaidr, ***@***.***> wrote:
Problem is here: scan: '{recipe.myscan}' The scan in the casa split task
should be str. Here you are calling scan ='{recipe.myscan}' which is a
for-loop over ms:
for_loop:
var: myscan
over: ms
You should set it to all.
Glad you brought this up because splitting scan by all is not working for
me as expected. If I set it to all I get this error:
CASA <1>: split(vis='MIGHTEE_CDFS_raw-J0333_2741-corr.ms',scan='all',outputvis='splitted_ns')
2022-11-21 21:49:24 SEVERE split:::: Scan Expression: Parse error at or near 'a'
2022-11-21 21:49:24 SEVERE split::::+ (near char. 1 in string "all")
Out[1]: False
If I set it to `` which should give me the same according to the docs:
scan -- Scan number range
default: ’’ = all
It works; however, I am only given 1 MS with all the scan numbers:
scans = list(numpy.unique(t.getcol('SCAN_NUMBER')))=[3, 5, 7, 9, 14, 16]
I recall this working previously when I tried it a while back in the
pipeline, so not sure whats gone wrong.
—
Reply to this email directly, view it on GitHub
<#18 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AWYM2BOX6NTYOJLRCWK2CE3WJPXHRANCNFSM6AAAAAASG6PCE4>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
This one.
|
yes we can do it this way, but I still want to know why casa cannot do it by setting scan to |
|
Yes I have done this, but the output I get is only 1 MS. |
Oh I see! If you want a per-scan MS then you have to run split once per scan, e.g.
|
Yes, that's what I did here: splitms_by_scan: #Its working well
info: " A loop to split/extract all scans from the Measurement Set and determine the sun coordinates (RA/DEC)"
recipe:
inputs:
myscans:
dtype: List[str]
info: "splitms by scans"
default: ["3","5","7","9","11","13","15","17","19","21","25","27","29","31","33","35","37","39","41","43","47","49"]
for_loop:
var: myscan
over: myscans
steps:
split_my_ms:
cab: splitms
params:
ms: '1583662427_sdp_l0.1024ch-J033230_280757-corr_self.ms'
scan: '{recipe.myscan}'
datacolumn: 'all'
outputvis: "scansuhf/perscan_ms/1583662427_sdp_l0.1024ch-J033230_280757-corr_self-scan{recipe.myscan}.ms" Looks like the only way it can work is giving a list of scans to the for loop...But that's mean that we will have to do it manualy... |
Yes this is what we did this before. I thought that if we do scan = |
No it doesn't have to be manually. We can just do |
But there's an issue with tb
But there's an issue with tb in python, because it is a casa command. Do you know which module we can import to use tb from python? |
You can use
|
But when using the Oleg has added the
|
yes, it says that 2022-11-22 13:00:02 STIMELA.boom.split_by_scan ERROR: NameError: name 'split' is not defined
2022-11-22 13:00:02 STIMELA.boom.split_by_scan ERROR: find_sun_stimela.split_ms1() threw
exception: name 'split' is not defined'
2022-11-22 13:00:02 STIMELA.boom INFO: saving full profiling stats to
./obsuhf/logs/log-/stimela.stats |
I'm a bit lost here with the intracies of stimela. If you are in a situation where you can call the CASA |
For my own pipeline processing the first step is to run a script that pulls all the relevant metadata out of the MS and writes it to files. Subsequent processing steps can then just consult the files when they need to know things like relevant scan numbers. Maybe something like that would be easier than trying to repeatedly consult the MS as the processing progresses... |
Ok I see the problem. If we using
So before we call this cab we have to do the table stuff in python and then call the cab. So have 2 steps, one for each:
|
Because as for as I know the casa commands and python ones are separate. Currently, in stimela, we can do purely only casa or python but not both. |
Then shouldn't |
Just FYI. It may be easier to do this with dask-ms convert (latest release) since it now supports a taql-where argument eg. $ dask-ms convert path_to_data.ms -g "FIELD_ID,DATA_DESC_ID,SCAN_NUMBER" -o output.ms --format casa --force --taql-where "SCAN_NUMBER==1" will split out scan 1 into an MS called output.ms |
Im trying this now, but getting the same as @Victoria-Samboco . Its not reading |
I'm trying to split the MS using the MS and not a list of scans as I did before, but I'm having an error with the outputvis.
I want it to return as outputvis something like
outputvis = scansuhf/perscan_ms/1583662427_sdp_l0.1024ch-J033230_280757-corr_self-scan_3.ms
, ... , but it is returningHow can I call the number of scans from the MS without creating a list of it in the recipe?
The text was updated successfully, but these errors were encountered: