Closed EastEriq closed 1 year ago
Note that AI.poopualteWCS is not needed anymore - happens automatically.
The problem is that the RA/Dec were not propogatyed to the catalog. To fix this:
AI=imProc.astrometry.addCoordinates2catalog(AI)
I'm using [W,AI]=imProc.astrometry.astrometryRefine(AI,'AddCoo2Cat',true)
, but now I get
Error using AstroCatalog/boundingCircle
Can not find RA/Dec coordinates in catalog
Error in imProc.calib.photometricZP (line 229)
[RA, Dec, CircleRadius] = boundingCircle(Cat, 'OutUnits','rad', 'CooType','sphere');
when I subsequently call [AI, ZP, PhotCat] =imProc.calib.photometricZP(AI)
And if I prepend AI=imProc.astrometry.addCoordinates2catalog(AI)
to that call to photometricZP()
, I get
Index exceeds the number of array elements. Index must not exceed 0.
Error in VO.search.search_sortedlat_multiNearest (line 67)
Ilowhigh = double(Inear(Ilat));
Error in imProc.match.matchReturnIndices (line 152)
[IndTable, CatFlagNearest, CatFlagAll, IndInObj2] = VO.search.search_sortedlat_multiNearest(Coo1,...
Error in imProc.calib.photometricZP (line 260)
ResMatch = imProc.match.matchReturnIndices(PhotCat(Iobj), Cat, 'Radius',Args.Radius,...
Great.
Guess what is DistFun
at line 152 of imProc.match.matchReturnIndices
. Again #156 . ^%#&^@#!!!
but besides line 237 of imProc.calib.photometricZP
retrieves an empty PhotCat(1)
, which is the cause of this error. Give me a break.
The empty catalog comes from this call: https://github.com/EranOfek/AstroPack/blob/9e08b02e19594ffedc43d1575671553aeb5378c0/matlab/image/%2BimProc/%2Bcat/getAstrometricCatalog.m#L102
which calls cone_search
. Guess which function uses cone_search
?
But that anyway seems not the problem. boundingCircle
at line 229 returns a very small CircleRadius
, 2.2744e-06. I suspect it might be an unit issue. At that point, Cat.ColUnits
are mostly empty, notably columns 52 and 53 for Ra and Dec.
I suspect you are right - this is a units problem.
On Sun, Aug 6, 2023 at 3:25 PM EastEriq @.***> wrote:
The empty catalog comes from this call: https://github.com/EranOfek/AstroPack/blob/9e08b02e19594ffedc43d1575671553aeb5378c0/matlab/image/%2BimProc/%2Bcat/getAstrometricCatalog.m#L102 which calls cone_search. Guess which function uses cone_search? But that anyway seems not the problem. boundingCircle at line 229 gets a very small CircleRadius, I suspect. Maybe it is an unit issue. At that point, Cat.ColUnits are mostly empty, notably columns 52 and 53 for Ra and Dec.
— Reply to this email directly, view it on GitHub https://github.com/EranOfek/AstroPack/issues/170#issuecomment-1666841941, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABJUQ4PXKTDVA6VFRR5TWWLXT6EK3ANCNFSM6AAAAAAZYGDGLY . You are receiving this because you modified the open/close state.Message ID: @.***>
Opened issue #213 separately for this
The latter problems solved by commit 9ce248d62fc.
AI is a processed PTF image ( /raid/enrico/PTF/2ndTake/images/level1/proc/2012/01/07/f12/c0/p5/v1/PTF_201201075042_i_p_scie_t120602_u011065103_f12_p015199_c00.fits), with the code