PapcoDoc/documents/P12MakeNewModule

From PapcoWiki

Jump to: navigation, search

Contents

Making a new module with papco 12

This serves as a starting-point tutorial for developing a papco module. The module created will have remote get and slicing capability.

introduction

A papco module is a set of IDL codes that introduce a new data set into papco. A module generally knows where to get data, how to download it to the end user's machine. Also, it knows how to plot the data, and provides controls to specify how it should be plotted. (The term "data set" is used loosely here to refer to a collection of plottable quantities.)

This tutorial walks through the process of creating a new module. We have a collection of files on an FTP site, containing 11 time-series plottable parameters. Our goal is to develop a module quickly that will allow us plot any of them in papco. This data set is referred to the onera_cdf's.

Data Storage

First, we need to identify how data will be ingested into papco. Typically modules will store data in files on the end user's hard drive, and if a module supports automatic retrieval they will get data from a remote ftp or http site. PaPCo provides an IDL object to make this easy.

For our example, let's say that the data is stored in CDF files, one for each mission day. These files are served to the public on the ftp site ftp://nis-ftp.lanl.gov/pub/users/friedel/jeremy/LANL_1990_095/cdf/.

Each installation will have an environment variable "PAPCO_DLNK" that is the name of directory in a large file system. The default for most modules is to store local copies of the data in this area, under a subdirectory with the same name as the module. So the data will be stored in PAPCO_DLNK/onera_cdf. This dataset will have a local store of data that is backed by a remote store on an FTP site.

We will start our module using the make new module wizard, and then write IDL code to specify how data is stored.

Make New Module Wizard

PaPCo 12 allows a new module to be created within a running papco session. This is probably the easiest way to start the new module. Under the configure menu of the menu bar, select "make new module".

Enlarge

This brings up a dialog for specifying the new module.

Enlarge

We change the name in this dialog to "my_module"


  • Configure->makeNewModule…
    • name: cluster_codif
    • location: papco_user_modules
  • Problems to be fixed:
    • (config not added to menu)
    • (cluster codif button too small)
    • (label came out wrong)

Module settings

  • Edit configuration file "defaults.config"
  • add control struct parameter to cluster_codif_cache, define cache based on parameter
    • (needed /enableGZip, needs documentation)
  • add parameters to cluster_codif_commons using papco_props
    • (template has stale comments)
    • (need separate control file in template)
  • descriptor in papcoadd
  • add stop to r_onefile.
  • r_cluster_codif needed parameter control
  • (how to get unit names in builder)
    • units= papco_ds_units()
  • (consider reform on builder for (1,31))
  • (need template for line, spec, cube)
  • (need template to use ds_caches)
  • (template slicer needs plotInfo)