Skip to content

Current dspec.read() for OVRO-LWA beamforming raw data requires the input to be a list. #313

@binchensun

Description

@binchensun

This is the relevant line -

elif source.lower() == 'lwa' and type(fname) is list:

As a result, when I supply the input as a string (file name), it does nothing. Example code on pipeline:
d.read('/nas7a/beam/beam-data/202504/beam20250421/060786_1612000000005159ee4', source='lwa')

If I change it to a list, it is okay:
d.read(['/nas7a/beam/beam-data/202504/beam20250421/060786_1612000000005159ee4'], source='lwa', timerange=['2025-04-21T16:14', '2025-04-21T16:19'])

We should make this more flexible and allow it to take the input as both a string and a list. dspec.sources.lwa.read_data() already has this feature (https://github.com/suncasa/suncasa-src/blob/master/suncasa/dspec/sources/lwa.py). Potentially add an if/else block to https://github.com/suncasa/suncasa-src/blob/38867155ad29d41d935b0afe5f2069beaa1d7e13/suncasa/dspec/dspec.py#L327C1-L337C46? @peijin94 @sageyu123

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