UCBerkeleySETI / hyperseti

A SETI / technosignature search code to find intelligent life beyond Earth
https://hyperseti.readthedocs.io
11 stars 4 forks source link

When gulp_size is too big, fall back to fine frequency dimension #55

Closed texadactyl closed 2 years ago

texadactyl commented 2 years ago

Suppose the number of fine channels = 100,000 and the gulp size default of 2^19 is taken. Then, in data_array.py iterate_through_data __slices, an assertion will fail. Better to reduce the gulp size to be the number of fine channels. And, catch this condition earlier in the code.

Solution in hyperseti.py find_et:

    ds = from_h5(filename)
    if gulp_size > ds.data.shape[2]:
        logger.warning("find_et: gulp_size ({}) > Num fine frequency channels ({}).  Setting gulp_size = {}"
                       .format(gulp_size, ds.data.shape[2], ds.data.shape[2]))
        gulp_size = ds.data.shape[2]