[Issues] select() behavior irritating
D.R. Boxhoorn
danny at astro.rug.nl
Tue Jul 25 15:21:48 CEST 2006
Hoi Jan,
The explanation of the .select() method is absent, which - I think - is the
cause of the irritation.
My attempt at an explanation would be:
.select() returns _THE_ calibration file that is valid given the constraints that are supplied as arguments.
If the constraints do not lead to a single object, the latest object that satisfies the constraints, is used.
and that should not leave any room for misinterpretation.
It's not easy to make something generic that behaves like you expect.
In the example you give, ColdPixelMap, there is also a dependency on filter.
So you'd get a ColdPixelMap for each unique combination of chip and filter.
That means you'd still be irritated if you'd expect one ColdPixelMap per chip.
The general case, a CalFile, may or may not be chip- or filterspecific,
which can lead to confusion.
There are two things that I see need to be done:
- Clarify the meaning of .select() in the documentation/howto's.
- Raise an error - or at least a warning - if CalFile.select() is called
without chip or filter, where CalFile requires either of these.
It's also possible to add a new function/method that behaves like you
expect, but I'm not sure how useful that would be.
Keep in mind that, if your code depends on accessing ColdPixelMaps for all
ccd's at the same time, it can less easily be parallellized.
Cheers,
Danny
On Tue, Jul 25, 2006 at 10:57:44AM +0200, Jan Snigula wrote:
> Hi all,
>
> wwe once more stumbled over an a bit irritating behavior of select. An
>
> query = ColdPixelMap.select( instrument='WFI', date='2000-04-01' )
>
> will only return one ColdPixelMap object. I know, that this is in
> principle expected, since select for a Calibration frame should
> return the newest valid one. But in this case I would still expect to
> get a list of ColdPixelMap objects, for each ccd? This query returned
> those for ccd53...
>
> Cheers,
>
> Jan
> _______________________________________________
> Issues mailing list
> Issues at astro-wise.org
> http://listman.astro-wise.org/mailman/listinfo/issues
More information about the Issues
mailing list