EranOfek / AstroPack

Astronomy & Astrophysics Software Pacakge
Other
17 stars 4 forks source link

findTransients code improvments #491

Closed EranOfek closed 2 months ago

EranOfek commented 2 months ago

in imProc.sources.findTransients We use the following lines:

  1. For variable names, first letter should be upper case.

  2. Re: BDlnt = BitDictionary('BitMask.Image.Default'); Make it possible to pass BDInt as an input (via "Args."), or as a char array: e.g., Args.BitDic = 'BitMaks.Image.Default'; if isa(Args.BitDic, 'BitDictionary') BDInt = Args.BitDic; else BDInt = BitDictionary(Args.BitDic) end

  3. Re:

    TranTable.ColUnits = {'','','','',... '','','',... '','','','',... '','','','','','','',... '','','','',... '','','','',... '','','',... };

you can use the cell function instead, but in any case I think this can be omitted and it should have no effect.

3. Re lines of the form:

Saturated = cell2mat(cellfun(@(c)any(strcmp(c,{'Saturated'})), ...
    BM_new, 'UniformOutput', false));
Near_Edge = cell2mat(cellfun(@(c)any(strcmp(c,{'NearEdge'})), ...
    BM_new, 'UniformOutput', false));

....

why not using the findBit method (of BitDictionary)?

RuslanKonno commented 2 months ago

Ah, actually, do we want to keep this function? It's superseded by AstroDiff and isn't part of the pipeline. If yes, there'll be a lot more changes needed, personally I'd just remove it.

EranOfek commented 2 months ago

sure.

On Sun, Jul 28, 2024 at 11:08 AM RuslanKonno @.***> wrote:

Ah, actually, do we want to keep this function? It's superseded by AstroDiff and isn't part of the pipeline. If yes, there'll be a lot more changes needed, personally I'd just remove it.

— Reply to this email directly, view it on GitHub https://github.com/EranOfek/AstroPack/issues/491#issuecomment-2254386596, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABJUQ4OHPOIJNCM7ZRQOD2TZOSRHHAVCNFSM6AAAAABLRZOXA6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENJUGM4DMNJZGY . You are receiving this because you authored the thread.Message ID: @.***>

RuslanKonno commented 2 months ago

Removed