[APBeta] Global observations script
Jeff Young
jey at adobe.com
Thu Mar 26 05:46:29 PDT 2009
Chris --
Glad you found it useful. It's loosely based on one Paul wrote several years ago.
And thanks for the feedback; I've copied your fixes to my copy of the script. Odd, though, that my binocular observations are different from yours....
Cheers,
-- Jeff
> -----Original Message-----
> From: apbeta-bounces at lists.astroplanner.net [mailto:apbeta-bounces at lists.astroplanner.net] On Behalf Of
> Christopher Todd
> Sent: Thursday, March 26, 2009 3:49 AM
> To: AstroPlanner Beta Testers <apbeta at lists.astroplanner.net>
> Subject: Re: [APBeta] Global observations script
>
> Jeff,
>
> I discovered that my primary problem was that I must have screwed something
> up when I ran the V1 to V2 converter, because my telescope resources did not
> match up correctly to what was in the Observations database (I think I
> manually re-created my telescope, Site, and eyepiece resources in V2). So
> when your script started querying for the properties of the scope and ep
> objects in GetMagnification, it choked.
>
> The other thing I discovered is that for binocular observations (at least in
> *my* observations database, YMMV), the ep field is not "None", but rather
> it's empty/Nil, so when you query for the EyepieceResource.Get(epName), it
> throws an Exception. So I moved the lines
> ep = EyepieceResource.Get(epName)
> aid = VisualAidResource.Get(aidName)
> Inside of the else block, like so:
> if scope.IsBinocular then
> mag = scope.Magnification
> else
> ep = EyepieceResource.Get(epName)
> aid = VisualAidResource.Get(aidName)
> mag = APResource.Magnification(scope, ep, aid)
> end if
>
> Then it worked just fine. Cool script! Thanks for writing it.
>
> Chris
>
>
> On 3/25/09 6:47 AM, "Jeff Young" <jey at adobe.com> wrote:
>
> > Chris --
> >
> > I did find one bug in the script -- if you have any observations with no
> > telescope listed (for instance, a naked-eye observation of a comet), then it
> > will throw an exception.
> >
> > The offending lines are in GetMagnification() where it checks
> > scope.IsBinocular and scope.IsTelescope without first checking if scope <>
> > nil.
> >
> > But I've also attached a new copy of the script which fixes the bug, and
> > implements some more sophisticated page-breaking rules:
> > * it attempts to place user images on the same page with their observations
> > * it includes "continued" headers when breaks occur within the observations
> > for a single target
> > * it removes the RA/Dec coordinates from moving targets (such as planets
> > and comets)
> >
> > Cheers,
> > -- Jeff.
>
>
> _______________________________________________
> APBeta mailing list
> APBeta at lists.astroplanner.net
> http://lists.astroplanner.net/listinfo.cgi/apbeta-astroplanner.net
More information about the APBeta
mailing list