Closed EastEriq closed 1 year ago
I will look into this, but you are suppose to use imUtil.psf.fwhm_fromBank
On Sun, 22 Aug 2021 at 19:07 EastEriq @.***> wrote:
Whatttt????????
imProc.psf.measureFocus(rand(1000,1000)) 19:05:22.094 [INF] loadFolder: /home/enrico/Eran/LAST/AstroPack/matlab/base/../../config 19:05:22.102 [INF] Adding property: A.b 19:05:22.128 [INF] loadYaml: Loading file: /home/enrico/Eran/LAST/AstroPack/config/A.b.yml 19:05:22.790 [INF] Adding property: BitMask.Image.Default 19:05:22.827 [INF] loadYaml: Loading file: /home/enrico/Eran/LAST/AstroPack/config/BitMask.Image.Default.yml 19:05:22.923 [INF] Adding property: Header.Comments.Default 19:05:22.925 [INF] loadYaml: Loading file: /home/enrico/Eran/LAST/AstroPack/config/Header.Comments.Default.yml 19:05:23.024 [INF] Adding property: Header.ImagePath.KeyNames 19:05:23.026 [INF] loadYaml: Loading file: /home/enrico/Eran/LAST/AstroPack/config/Header.ImagePath.KeyNames.yml 19:05:23.059 [INF] Adding property: Header.KeyNames.Default 19:05:23.060 [INF] loadYaml: Loading file: /home/enrico/Eran/LAST/AstroPack/config/Header.KeyNames.Default.yml 19:05:23.171 [INF] Adding property: Header.Synonyms.KeyNames 19:05:23.172 [INF] loadYaml: Loading file: /home/enrico/Eran/LAST/AstroPack/config/Header.Synonyms.KeyNames.yml 19:05:23.195 [INF] Adding property: Header.Synonyms.KeyVal.IMTYPE 19:05:23.196 [INF] loadYaml: Loading file: /home/enrico/Eran/LAST/AstroPack/config/Header.Synonyms.KeyVal.IMTYPE.yml 19:05:23.212 [INF] Adding property: Header.Time.KeyNames 19:05:23.213 [INF] loadYaml: Loading file: /home/enrico/Eran/LAST/AstroPack/config/Header.Time.KeyNames.yml 19:05:23.229 [INF] Adding property: IncomingAlertsFilter 19:05:23.231 [INF] loadYaml: Loading file: /home/enrico/Eran/LAST/AstroPack/config/IncomingAlertsFilter.yml 19:05:23.279 [INF] Adding property: Install.Data.Dirs 19:05:23.279 [INF] loadYaml: Loading file: /home/enrico/Eran/LAST/AstroPack/config/Install.Data.Dirs.yml 19:05:23.289 [INF] Adding property: Scheduler 19:05:23.290 [INF] loadYaml: Loading file: /home/enrico/Eran/LAST/AstroPack/config/Scheduler.yml 19:05:23.327 [INF] Adding property: WCS.CUNIT 19:05:23.328 [INF] loadYaml: Loading file: /home/enrico/Eran/LAST/AstroPack/config/WCS.CUNIT.yml 19:05:23.337 [INF] Adding property: WCS.ProjType 19:05:23.338 [INF] loadYaml: Loading file: /home/enrico/Eran/LAST/AstroPack/config/WCS.ProjType.yml 19:05:23.352 [INF] Adding property: WFAST.Header.KeyNames 19:05:23.353 [INF] loadYaml: Loading file: /home/enrico/Eran/LAST/AstroPack/config/WFAST.Header.KeyNames.yml 19:05:23.406 [INF] Adding property: WFAST.Header.WCS 19:05:23.407 [INF] loadYaml: Loading file: /home/enrico/Eran/LAST/AstroPack/config/WFAST.Header.WCS.yml 19:05:23.508 [INF] Adding property: header 19:05:23.509 [INF] loadYaml: Loading file: /home/enrico/Eran/LAST/AstroPack/config/header.yml [ERR] loadYaml: Exception loading file: /home/enrico/Eran/LAST/AstroPack/config/header.yml [ERR] Configuration.loadYaml failed: /home/enrico/Eran/LAST/AstroPack/config/header.yml 19:05:23.784 [INF] Adding property: pipeline 19:05:23.785 [INF] loadYaml: Loading file: /home/enrico/Eran/LAST/AstroPack/config/pipeline.yml 19:05:23.833 [INF] Adding property: pipeline_input 19:05:23.834 [INF] loadYaml: Loading file: /home/enrico/Eran/LAST/AstroPack/config/pipeline_input.yml 19:05:23.850 [INF] Adding property: system 19:05:23.852 [INF] loadYaml: Loading file: /home/enrico/Eran/LAST/AstroPack/config/system.yml 19:05:23.879 [INF] Adding property: unittest 19:05:23.880 [INF] loadYaml: Loading file: /home/enrico/Eran/LAST/AstroPack/config/unittest.yml 19:05:23.945 [INF] loadFolder: /home/enrico/Eran/LAST/AstroPack/matlab/base/../../config 19:05:24.275 [DBG] ComponentMap created: DictionaryFromConfig 19:05:24.283 [INF] ComponentMap.add: Header.Synonyms.KeyNames 19:05:24.287 [INF] ComponentMap.add: Header.Synonyms.KeyVal.IMTYPE 19:05:24.290 [INF] ComponentMap.add: Header.Comments.Default 19:05:24.293 [INF] ComponentMap.add: Header.Time.KeyNames Error using reshape Size vector must be a row vector with integer elements.
Error in AstroImage (line 187) Obj = reshape(Obj, FileNames);
Error in imProc.psf.measureFocus (line 42) Obj = AstroImage(Obj);
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/EranOfek/AstroPack/issues/20, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABJUQ4PYLX2OMXTSQSMGTEDT6EOFHANCNFSM5CTCYHSQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email .
bug fixed
On Sun, Aug 22, 2021 at 7:07 PM EastEriq @.***> wrote:
Whatttt????????
imProc.psf.measureFocus(rand(1000,1000)) 19:05:22.094 [INF] loadFolder: /home/enrico/Eran/LAST/AstroPack/matlab/base/../../config 19:05:22.102 [INF] Adding property: A.b 19:05:22.128 [INF] loadYaml: Loading file: /home/enrico/Eran/LAST/AstroPack/config/A.b.yml 19:05:22.790 [INF] Adding property: BitMask.Image.Default 19:05:22.827 [INF] loadYaml: Loading file: /home/enrico/Eran/LAST/AstroPack/config/BitMask.Image.Default.yml 19:05:22.923 [INF] Adding property: Header.Comments.Default 19:05:22.925 [INF] loadYaml: Loading file: /home/enrico/Eran/LAST/AstroPack/config/Header.Comments.Default.yml 19:05:23.024 [INF] Adding property: Header.ImagePath.KeyNames 19:05:23.026 [INF] loadYaml: Loading file: /home/enrico/Eran/LAST/AstroPack/config/Header.ImagePath.KeyNames.yml 19:05:23.059 [INF] Adding property: Header.KeyNames.Default 19:05:23.060 [INF] loadYaml: Loading file: /home/enrico/Eran/LAST/AstroPack/config/Header.KeyNames.Default.yml 19:05:23.171 [INF] Adding property: Header.Synonyms.KeyNames 19:05:23.172 [INF] loadYaml: Loading file: /home/enrico/Eran/LAST/AstroPack/config/Header.Synonyms.KeyNames.yml 19:05:23.195 [INF] Adding property: Header.Synonyms.KeyVal.IMTYPE 19:05:23.196 [INF] loadYaml: Loading file: /home/enrico/Eran/LAST/AstroPack/config/Header.Synonyms.KeyVal.IMTYPE.yml 19:05:23.212 [INF] Adding property: Header.Time.KeyNames 19:05:23.213 [INF] loadYaml: Loading file: /home/enrico/Eran/LAST/AstroPack/config/Header.Time.KeyNames.yml 19:05:23.229 [INF] Adding property: IncomingAlertsFilter 19:05:23.231 [INF] loadYaml: Loading file: /home/enrico/Eran/LAST/AstroPack/config/IncomingAlertsFilter.yml 19:05:23.279 [INF] Adding property: Install.Data.Dirs 19:05:23.279 [INF] loadYaml: Loading file: /home/enrico/Eran/LAST/AstroPack/config/Install.Data.Dirs.yml 19:05:23.289 [INF] Adding property: Scheduler 19:05:23.290 [INF] loadYaml: Loading file: /home/enrico/Eran/LAST/AstroPack/config/Scheduler.yml 19:05:23.327 [INF] Adding property: WCS.CUNIT 19:05:23.328 [INF] loadYaml: Loading file: /home/enrico/Eran/LAST/AstroPack/config/WCS.CUNIT.yml 19:05:23.337 [INF] Adding property: WCS.ProjType 19:05:23.338 [INF] loadYaml: Loading file: /home/enrico/Eran/LAST/AstroPack/config/WCS.ProjType.yml 19:05:23.352 [INF] Adding property: WFAST.Header.KeyNames 19:05:23.353 [INF] loadYaml: Loading file: /home/enrico/Eran/LAST/AstroPack/config/WFAST.Header.KeyNames.yml 19:05:23.406 [INF] Adding property: WFAST.Header.WCS 19:05:23.407 [INF] loadYaml: Loading file: /home/enrico/Eran/LAST/AstroPack/config/WFAST.Header.WCS.yml 19:05:23.508 [INF] Adding property: header 19:05:23.509 [INF] loadYaml: Loading file: /home/enrico/Eran/LAST/AstroPack/config/header.yml [ERR] loadYaml: Exception loading file: /home/enrico/Eran/LAST/AstroPack/config/header.yml [ERR] Configuration.loadYaml failed: /home/enrico/Eran/LAST/AstroPack/config/header.yml 19:05:23.784 [INF] Adding property: pipeline 19:05:23.785 [INF] loadYaml: Loading file: /home/enrico/Eran/LAST/AstroPack/config/pipeline.yml 19:05:23.833 [INF] Adding property: pipeline_input 19:05:23.834 [INF] loadYaml: Loading file: /home/enrico/Eran/LAST/AstroPack/config/pipeline_input.yml 19:05:23.850 [INF] Adding property: system 19:05:23.852 [INF] loadYaml: Loading file: /home/enrico/Eran/LAST/AstroPack/config/system.yml 19:05:23.879 [INF] Adding property: unittest 19:05:23.880 [INF] loadYaml: Loading file: /home/enrico/Eran/LAST/AstroPack/config/unittest.yml 19:05:23.945 [INF] loadFolder: /home/enrico/Eran/LAST/AstroPack/matlab/base/../../config 19:05:24.275 [DBG] ComponentMap created: DictionaryFromConfig 19:05:24.283 [INF] ComponentMap.add: Header.Synonyms.KeyNames 19:05:24.287 [INF] ComponentMap.add: Header.Synonyms.KeyVal.IMTYPE 19:05:24.290 [INF] ComponentMap.add: Header.Comments.Default 19:05:24.293 [INF] ComponentMap.add: Header.Time.KeyNames Error using reshape Size vector must be a row vector with integer elements.
Error in AstroImage (line 187) Obj = reshape(Obj, FileNames);
Error in imProc.psf.measureFocus (line 42) Obj = AstroImage(Obj);
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/EranOfek/AstroPack/issues/20, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABJUQ4PYLX2OMXTSQSMGTEDT6EOFHANCNFSM5CTCYHSQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email .
You confused me.
Note that imageFocus was moved into: imProc.psf.measureFocus
So I'm supposed to replace LAST_OCS's obs.util.image.imageFocus with imUtil.psf.fwhm_fromBank (modulo adapting how it is called within obs.unitCS.focusLoop). Correct?
sorry I meant measureFWHM
On Sun, Aug 22, 2021 at 11:37 PM EastEriq @.***> wrote:
You confused me.
Note that imageFocus was moved into: imProc.psf.measureFocus
So I'm supposed to replace https://github.com/PolishookDavid/LAST_OCS/blob/mastrolindo/%2Bobs/%2Butil/%2Bimage/imageFocus.m with https://github.com/EranOfek/AstroPack/blob/dev1/matlab/image/%2BimUtil/%2Bpsf/fwhm_fromBank.m (modulo adapting how it is called within https://github.com/PolishookDavid/LAST_OCS/blob/mastrolindo/%2Bobs/%40unitCS/focusLoop.m). Correct?
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/EranOfek/AstroPack/issues/20#issuecomment-903327100, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABJUQ4PBNYVUNNGUK5I5JUTT6FNYTANCNFSM5CTCYHSQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email .
I understand even less then.
just use: imUtil.psf.fwhm_fromBank thanks, eran
On Mon, Aug 23, 2021 at 12:44 AM EastEriq @.***> wrote:
I understand even less then.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/EranOfek/AstroPack/issues/20#issuecomment-903334603, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABJUQ4J5P2UM4IPALLLUV43T6FVSVANCNFSM5CTCYHSQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email .
obs.unitCS.focusLoop()
has optional arguments [relevant to focus calculation]:
It used to call, in my implementation obs.util.image.imageFocus(Image,ImageHalfSize,SigmaVec,PixScale,SeveralPositions)
In its bowels, it was calling imUtil.filter.filter2_snBank(Image,[],[],@imUtil.kernel2.gauss,SigmaVec)
Now imUtil.psf.fwhm_fromBank()
has potentially relevant arguments:
Apart of the ones with corresponding name, what the heck am I supposed to do? Is imUtil.psf.fwhm_fromBank()
supposed to replace obs.util.image.imageFocus()
or just imUtil.filter.filter2_snBank()
? Are the default values ok for the obs.unitCS.focusLoop()
use case?
Hi Enrico,
You can use:
input arguments (via varargin):
PixScale = 1.25; SigmaVec = logspace(0,2,5); HalfSize = 1000;
% Next, calculate: [CenterY, CenterX] = size(Image).*0.5; CCDSEC = [CenterX - HalfSize, CenterX + HalfSize, CenterY - HalfSize, CenterY + HalfSize]; [FWHM,Nstars]=fwhm_fromBank(Image, 'PixScale',PixScale,... 'Method','bisec','MaxIter',6,'SigmaVec',SigmaVec,'CCDSEC',CCDSEC);
Let me know if this is not clear Eran
On Mon, Aug 23, 2021 at 5:47 PM EastEriq @.***> wrote:
obs.unitCS.focusLoop() has optional arguments [relevant to focus calculation]:
- HalfRange
- ImageHalfSize
- SeveralPositions
- SigmaVec
- PixScale
It used to call, in my implementation obs.util.image.imageFocus(Image,ImageHalfSize,SigmaVec,PixScale,SeveralPositions)
In its bowels, it was calling @.***,SigmaVec)
Now imUtil.psf.fwhm_fromBank() has potentially relevant arguments:
- Background
- Variance
- SigmaVec
- MinStars
- PixScale
- Method
- MaxIter
Apart of the ones with corresponding name, what the heck am I supposed to do? Is imUtil.psf.fwhm_fromBank() supposed to replace obs.util.image.imageFocus() or just imUtil.filter.filter2_snBank()? Are the default values ok for the obs.unitCS.focusLoop() use case?
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/EranOfek/AstroPack/issues/20#issuecomment-903841134, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABJUQ4OPRAWML2MW3GGSE7TT6JNPTANCNFSM5CTCYHSQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email .
what with SeveralPositions?
For the basic focus loop this is not needed. Eran
On Mon, 23 Aug 2021 at 19:37 EastEriq @.***> wrote:
what with SeveralPositions?
— You are receiving this because you commented.
Reply to this email directly, view it on GitHub https://github.com/EranOfek/AstroPack/issues/20#issuecomment-903934044, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABJUQ4NROJJ23WJDEMTHLS3T6J2NPANCNFSM5CTCYHSQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email .
Whatttt????????