CAOM-2.3公用事业

caom2utils的Python项目详细描述


CAOM2实用程序

https://img.shields.io/pypi/v/caom2utils.svg

使用caom2模型的工具。

观察验证

根据元素的属性以及可能的所有子元素验证caom2元素(观察、平面、工件、部分或块)。验证示例:属性值、平面的球面几何体、chuncks的wcs等。

from__future__import(absolute_import,division,print_function,unicode_literals)importsysfromcaom2importSimpleObservationimportcaom2utilsobs=SimpleObservation('collection','observationID')# change and update obstry:caom2utils.validate(obs)exceptException:print('My exception is not valid')

观测生成

在这个包中,有两个命令行应用程序将生成一个caom2观察结果。fits2caom2采用遗留操作,不应该完全替代java应用程序。caom2gen提供了一种稍有不同的调用机制,依赖于配置信息的蓝图,并在命令行指定观察/平面/工件组合的基数。

设备2 caom2

usage: fits2caom2 [-h] [--cert CERT | -n | --netrc-file NETRC_FILE | -u USER]
                  [--host HOST] [--resource-id RESOURCE_ID] [-d | -q | -v]
                  [-V] [--dumpconfig] [--no_validate]
                  [-o OUT_OBS_XML]
                  (-i IN_OBS_XML | --observation collection observationID)
                  [--local LOCAL [LOCAL ...]] [--keep] [--test]
                  [--productID PRODUCTID] [--config CONFIG]
                  [--default DEFAULT] [--override OVERRIDE]
                  fileURI [fileURI ...]

Augments an observation with information in one or more fits files.

positional arguments:
  fileURI                                 URI of a fits file

optional arguments:
  --cert CERT                             location of your X509 certificate to use for
                                          authentication (unencrypted, in PEM format)
  --config CONFIG                         optional CAOM2 utype to keyword config file to merge
                                          with the internal configuration
  -d, --debug                             debug messages
  --default DEFAULT                       file with default values for keywords
  --dumpconfig                            output the utype to keyword mapping to the console
  -h, --help                              show this help message and exit
  --host HOST                             base hostname for services - used mainly for testing
                                          (default: www.cadc-ccda.hia-iha.nrc-cnrc.gc.ca)
  -i, --in IN_OBS_XML                     input of observation to be augmented in XML
  --keep                                  keep the locally stored files after ingestion
  --local LOCAL [ LOCAL ...]
                                          list of files in local filesystem (same order as uri)
  -n                                      use .netrc in $HOME for authentication
  --netrc-file NETRC_FILE
                                          netrc file to use for authentication
  --no_validate                           by default, the application will validate the WCS
                                          information for an observation. Specifying this flag
                                          skips that step.
  --observation collection observationID
                                          observation in a collection
  -o, --out OUT_OBS_XML                   output of augmented observation in XML
  --override OVERRIDE                     file with override values for keywords
  --productID PRODUCTID                   product ID of the plane in the observation
  -q, --quiet                             run quietly
  --resource-id RESOURCE_ID               resource identifier (default
                                          ivo://cadc.nrc.ca/fits2caom2)
  --test                                  test mode, do not persist to database
  -u, --user USER                         name of user to authenticate. Note: application
                                          prompts for the corresponding password!
  -v, --verbose                           verbose messages
  -V, --version                           show program's version number and exit

caom2gen

usage: caom2gen [-h] [--cert CERT | -n | --netrc-file NETRC_FILE | -u USER]
                [--host HOST] [--resource-id RESOURCE_ID] [-d | -q | -v] [-V]
                [--dumpconfig] [--no_validate]
                [-o OUT_OBS_XML]
                (-i IN_OBS_XML | --observation collection observationID)
                [--local LOCAL [LOCAL ...]] [--keep] [--test]
                [--module MODULE] [--plugin PLUGIN]
                [--lineage LINEAGE [LINEAGE ...]] --blueprint BLUEPRINT
                [BLUEPRINT ...]

Augments an observation with information in one or more fits files.

optional arguments:
  --blueprint BLUEPRINT [BLUEPRINT ...]
                        list of files with blueprints for CAOM2 construction,
                        in serialized format. If the list is of length 1, the
                        same blueprint will be applied to all lineage entries.
                        Otherwise, there must be a blueprint file per lineage
                        entry.
  --cert CERT           location of your X509 certificate to use for
                        authentication (unencrypted, in PEM format)
  -d, --debug           debug messages
  --dumpconfig          output the utype to keyword mapping to the console
  -h, --help            show this help message and exit
  --host HOST           base hostname for services - used mainly for testing
                        (default: www.cadc-ccda.hia-iha.nrc-cnrc.gc.ca)
  -i, --in IN_OBS_XML   input of observation to be augmented in XML
  --keep                keep the locally stored files after ingestion
  --lineage LINEAGE [LINEAGE ...]
                        productID/artifactURI. List of plane/artifact
                        identifiers that will becreated for the identified
                        observation.
  --local LOCAL [LOCAL ...]
                        list of files in local filesystem (same order as uri)
  --module MODULE       if the blueprint contains function calls, call
                        importlib.import_module for the named module. Provide
                        a fully qualified name. Parameter choices are the
                        artifact URI (uri) or a list of astropy Header
                        instances (header). This will allow the update of a
                        single blueprint entry with a single call.
  -n                    use .netrc in $HOME for authentication
  --netrc-file NETRC_FILE
                        netrc file to use for authentication
  --no_validate         by default, the application will validate the WCS
                        information for an observation. Specifying this flag
                        skips that step.
  --observation collection observationID
                        observation in a collection
  -o, --out OUT_OBS_XML
                        output of augmented observation in XML
  --plugin PLUGIN       if this parameter is specified, call
                        importlib.import_module for the named module. Then
                        execute the method "update", with the signature
                        (Observation, **kwargs). This will allow for the
                        update of multiple observation data members with one
                        call.
  -q, --quiet           run quietly
  --resource-id RESOURCE_ID
                        resource identifier (default
                        ivo://cadc.nrc.ca/fits2caom2)
  --test                test mode, do not persist to database
  -u, --user USER       name of user to authenticate. Note: application
                        prompts for the corresponding password!
  -v, --verbose         verbose messages
  -V, --version         show program's version number and exit

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java使用EntityManager有没有更有效的习惯用法?   Android上的java Google应用程序引擎(GAE)响应代码和cookie   如何在Java中创建单元测试?   java从DB获取特定列的最新行   java替换所有悬空元字符   java使用Hibernate删除SQL表中的数据   swing显示JComponent对象Java   java在确认内容类型后如何将URL保存到文件?   javascript如何从段落中选择大量单词?(硒)   java在Linux上使用BundleEnableTiveCode不起作用   java使用日志似然性来比较不同的mallet主题模型?   java无法在Tomcat7上运行Spring Boot 2.0:“由于缺少ServletWebServerFactory bean,无法启动ServletWebServerApplicationContext。”   java有办法显式引用非静态内部类实例吗?   java如何使用Spring的NamedParameterJdbcTemplate在MySQL数据库中创建和删除表?