Skip to content

Selective target download using mvftoms, all data is flagged. #390

@physicistsam

Description

@physicistsam

Hi @ludwigschwardt and @Jordatious,

Maybe I am doing something very silly. I wanted to dowload some particular fileds from an observation. I am using the script mvftoms.py. I tried with two different commads they are as follows:

1) python3 ../mvftoms.py --target J1939-6342,J1130-1449,J1550+0527,HydraA -o import_test.ms --flags cam,data_lost,ingest_rfi /<rdb_path>/1745785447_sdp_l0.full.rdb
2) python3 ../mvftoms.py --full_pol --target-tag='fluxcal' --target-tag='gaincal' --target-tag='polcal' --target-tag='target' /<rdb_path>/1745354701_sdp_l0.full.rdb

Then I ran a loop to find flag fraction in these two cases:

vis='import_test.ms'#os.getcwd()+'/'+block+'_sdp_l0.ms'
ii = 0
for ii in range (1, 10):
    invis = vis
    sumr = ct.flagdata(vis=invis, mode='summary',scan='%s'%ii)
    print(sumr)
    dsum = pd.DataFrame.from_dict(sumr['antenna'])
    dsum.loc['flag_frac'] = dsum.loc['flagged']/dsum.loc['total']
    # plt.subplots(figsize=(6, 2))
    ax = dsum.transpose().plot.bar(y='flag_frac',rot=45, figsize=(16, 4), legend=False, ylabel='Flag Fraction', title='Scan = %s'%ii)
    plt.tight_layout()
    fig = ax.get_figure()
    fig.savefig('scan_%s.png'%ii)
    
    del sumr, dsum, ax 

However, both the cases I am finiding 98-100% data is flagged.

I tried with three more observations, same results. Can you please point me, what am I doing wrong.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions