mhardcastle / ddf-pipeline

LOFAR pipeline using killms/ddfacet
GNU General Public License v2.0
23 stars 20 forks source link

Lossing track of DATA_SUB column #314

Closed twshimwell closed 1 year ago

twshimwell commented 1 year ago

This is a pretty bad bug if not doing the bootstrap step and doing the subtraction of sources in the outer region (fortunately we dont really run with these options very often).

Line 1441 - Line 1444 of pipeline.py does:

    if o['bootstrap']:
        colname='SCALED_DATA'
    else:
        colname=o['colname']

If the outer region extract is done and bootstrap isnt done then this will reset the column to "DATA" (or whatever you have in your ddf-pipeline parset). Whereas it should be DATA_SUB as thats the appropriate column to use when the extract is done.

twshimwell commented 1 year ago

Pushed fix to master - 7dd8cc0

    if o['bootstrap']:
        colname='SCALED_DATA'
    else:
        if o['do_wide']:
            colname='DATA_SUB'
        else:
            colname=o['colname']
twshimwell commented 1 year ago

Same error also occurs on lines 1386-1390:

        separator("Another DI step")
        if o['bootstrap']:
            colname='SCALED_DATA'
        else:
            colname=o['colname']

Put same alteration in with 5805f10

mhardcastle commented 1 year ago

Thanks for this, seems like the right thing to do even if this isn't a mode we normally use.

We might just want a function which can be called throughout the pipeline which says 'what's our current base column'.

twshimwell commented 1 year ago

That might be a good idea. It seems its getting quite easy to get confused with all the different columns at the moment and very easy to accidentally make a mistake.

mhardcastle commented 1 year ago

Should be fixed now.