EranOfek / AstroPack

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

pipeline stack because number of found asteroids is too large #468

Closed EranOfek closed 3 weeks ago

EranOfek commented 3 weeks ago

pipeline takes too long to run because number of found asteroids is too large. Problem is in: searchAsteroids_pmCat Specifically, sometimes, especially in high density fields, it finds too many candidates.

EranOfek commented 3 weeks ago

Fixed. If there are more than 10 asteroids in the image, then select ~<10 asteroids with the highest Tdist stat.

EranOfek commented 3 weeks ago

[dev1 7290a00f] - Fixed.

Since it is unlikely to have more than 10 candidates per sub image, added the following lines in: imProc.asteroids.searchAsteroids_pmCat

if NastCand>Args.MaxNumAst
                % select only top /best asteroids according to Tdist
                Nsrc = numel(PM_TdistProb);
                Flags(Icat).All = Flags(Icat).All & PM_TdistProb>quantile(PM_TdistProb, (Nsrc - Args.MaxNumAst)./Nsrc);
                AstInd   = find(Flags(Icat).All);
                NastCand = numel(AstInd);
            end

Args.MaxNumAst default is set to 10.