Hi all,
On 6 Mai, 11:10, Dirk Lehmann <
doe...@gmx.de> wrote:
> Hi all,
>
> what about stripping the imagerType element down to only the unique
> ID, vendor and model. And using this as a base element all other
> imagers must derive from.
> The derived CCDImager element would move out into a separate schema
> file.
>
> With that we would have a general anchor in the base schema for all
> kind of imagers, and we don't need
> to create a dependency from the base.xsd to some extension xsd. (As
> observations element requires some
> basic knowledge on imagers and that basic description should be held
> in the base.xsd IMHO)
>
> Best regards
>
> Dirk
>
Before uploading my recent changes, I first have to go through some
tests. Here is a description of what I changed:
* Modified imagerType:
<!--Describes the imaging device used in an observation. This type
may be extended to capture information on different sensor
technologies.-->
<!-- New in V2.0: this type is now abstract. Concrete imagers are
extending the definition, using the ext_imaging schema file. -->
<xsd:complexType name="imagerType" abstract="true">
<xsd:sequence>
<!-- model or designation -->
<xsd:element name="model" type="xsd:string"/>
<!-- New in V2.0: 'type' element removed: concrete imagers are
extending this type definition in the ext_imaging extension -->
<xsd:element name="vendor" type="xsd:string" minOccurs="0"/>
<xsd:element name="remarks" type="xsd:string" minOccurs="0"/>
</xsd:sequence>
<xsd:attribute name="id" type="xsd:ID" use="required"/>
</xsd:complexType>
There is a new extension called ext_Imaging.xsd with the derived CCD
camera type:
<!--An extension of the imagerType to describe CCD cameras-->
<xsd:complexType name="ccdCameraType">
<xsd:complexContent>
<xsd:extension base="oal:imagerType">
<xsd:sequence>
<xsd:element name="pixelsX" type="xsd:positiveInteger"/>
<xsd:element name="pixelsY" type="xsd:positiveInteger"/>
<!-- New in V2.0: Pixel size in microns -->
<xsd:element name="pixelXSize" type="oal:positiveDecimal"
minOccurs="0"/>
<xsd:element name="pixelYSize"
type="oal:positiveDecimal" minOccurs="0"/>
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
If there where "photographical findings" some day including exposure
times, filter usage, binning settings, darkframe / flatfield data,
descriptions of image processing tools and techniques, ... this would
also go in this extension.
I have already implemented the Clusters of Galaxies in E&T and
realized that their <mag10> element is not practical. This is the
magnitude of the 10th brightest member of the cluster. I decided to
discard this element and use the <visMag> of the deepSkyTargetType to
store this data. At first this may look like a modelling flaw, but is
has a simple practical advantage: you may easily consider CGs when
filtering for objects with a user defined limiting magnitude. So a
typical object database SQL query does not have to join a details
table for the magnitude of CGs, but use the common magnitude column
for all objects. Given this, the CG definition shrinks down to
triviality:
<!-- New in Version 2.0 -->
<!-- type definition for clusters of galaxies -->
<xsd:complexType name="deepSkyCG">
<xsd:complexContent>
<xsd:extension base="oal:deepSkyTargetType"/>
<!-- For Clusters of Galaxies, the *magnitude of the 10th brightest
member* is given -->
<!-- in the <visMag> element of the deepSkyTargetType -->
</xsd:complexContent>
</xsd:complexType>
Then I came across *notes* of the observation targets. We have talked
about before, but just forgot them. Fixing this, I have inserted the
<notes> element after the optional <constellation>:
<!-- type definition for arbitrary observation targets -->
<xsd:complexType name="observationTargetType">
<xsd:sequence>
<xsd:choice>
<!-- identification of data source -->
<xsd:element name="datasource" type="xsd:string"/>
<!-- used for targets not listed in standard catalogs; f.e. newly
discovered objects -->
<xsd:element name="observer" type="xsd:IDREF"/>
</xsd:choice>
<!-- most common name -->
<xsd:element name="name" type="xsd:string"/>
<!-- alternative names -->
<xsd:element name="alias" type="xsd:string" minOccurs="0"
maxOccurs="unbounded"/>
<xsd:element name="position" type="oal:equPosType" minOccurs="0"/>
<!-- constellation is optional because it can be derived from
position -->
<xsd:element name="constellation" type="xsd:string" minOccurs="0"/>
<!-- New in V 2.0: notes on targets -->
<xsd:element name="notes" type="xsd:string" minOccurs="0"/>
</xsd:sequence>
<xsd:attribute name="id" type="xsd:ID" use="required"/>
</xsd:complexType>
When importing, an application has to decide how to deal with
differences between existent notes and the notes to be imported. Some
cases are straightforward:
* If we do not have notes, import the ones from the file
* If the file's notes are empty, do nothing to the existent notes
* If there are notes in stock and the notes to be imported are the
same, do nothing
And now it becomes interesting:
* If there are notes in stock and the notes to be imported are
different, let the user decide what to do. Possible options are: keep
existing, replace existing, or merge (append or prepend, insert a
comment). Looking closer on this, it seems a bit complicated. While
this "notes conflicts handling" is not a core task of our schema work,
it seems reasonable to me to give some advice on this topic in a
future "Programmer's Guide". All applications using a database to
persist target data will have to answer this question - if they
support target notes at all.
I also reordered some of the type definitions. While editing, I
suddenly had the feeling that this was due as definitions did not
follow up in any order related to anything... That had to be tidied up
a bit.
Best wishes,
Tom