From brideout at haystack.mit.edu Thu Apr 16 15:26:59 2009 From: brideout at haystack.mit.edu (Bill Rideout) Date: Thu, 16 Apr 2009 15:26:59 -0400 Subject: [OpenMadrigal-developers] Making it easier to create Cedar catalog and header records Message-ID: <1AB38486-5314-4599-8BAB-25DE64356580@haystack.mit.edu> Koki, In discussing your need to load a lot of different types of Jicamarca data into Madrigal, it became clear to me that the python API should have an easier way to create catalog and header records. Catalog and header records contain a lot of information that can be deduced from the data - this includes which parameters are present, minimum and maximums of certain parameters, and start and stop times. The only parts of the catalog or header record that can't be determined automatically are some descriptive text fields, all of which are purely optional. To address this, I've added a new class to the python madrigal.cedar module (the one that creates Cedar file). It's called CatalogHeaderCreator. By default it creates catalog and header records with all the basic fields filled out. You can also pass it simple text to add descriptive text to any of the parts of catalog or header records that accept descriptive text. With this module you just ignore formatting - its the code's job to put whatever text you give it into the catalog or header record. There are no limits to the length of any text field. According to the Cedar standard, there are actually 11 different parts of catalog or header records where you can put descriptive text. Honestly, we only use above half of them at Millstone. But the API allows you to use all eleven, none, or some number in between. If you are interested in what we typically do at Millstone, I can send you an example. I've re-written the script I wrote before that loads Jicamarca magnetometer data. Once the basic documentation is ready, I'll send it to Miguel and we'll discuss how it works, because I think it provides a straight-forward example of how to create other Cedar data files. With the new CatalogHeaderCreator, the script is about 40% shorter. I'm now in the process of updating the documentation to support this change. I want to also update my example code to use this new module. I also want to document the eleven different text fields you can put in catalog or header records in the Madrigal documentation. Let me know if you have any questions or comments. -Bill Bill Rideout MIT Haystack Observatory brideout at haystack.mit.edu 781 981-5624