Table of Contents

Class: MadrigalExperiment madrigalWeb/madrigalWeb.py

MadrigalExperiment is a class that encapsulates information about a Madrigal Experiment.

Attributes:

        id (int) Example: 10000111.  Uniquely identifies experiment.

        realUrl (string) the real url to display this experiment in a web browser.

        url (string) Example: 'http://madrigal.haystack.mit.edu/cgi-bin/madtoc/1997/mlh/03dec97'
            Note: this is a an old url that no longer works, but it is the form stored in the metadata.
            See realUrl attribute for working url.

        name (string) Example: 'Wide Latitude Substorm Study'

        siteid (int) Example: 1

        sitename (string) Example: 'Millstone Hill Observatory'

        instcode (int) Code of instrument. Example: 30

        instname (string) Instrument name. Example: 'Millstone Hill Incoherent Scatter Radar'

        startyear - int

        startmonth - int

        startday - int

        starthour - int

        startmin - int

        startsec - int

        endyear - int

        endmonth - int

        endday - int

        endhour - int

        endmin - int

        endsec - int

        isLocal - True if a local experiment, False if not

        madrigalUrl - url of Madrigal site.  Used if not a local experiment.

        pi - experiment Principal investigator

        piEmail - experiment Principal investigator's email

        realUrl - working url to experiment (use this instead of url)

        uttimestamp - st_mtime of expDir. None if not supported by the Madrigal site

        access - access code of the experiment (0 if public, 2 if public).  None if not
            supported by the Madrigal site.

Non-standard Python modules used: None

Change history:

Written by Bill Rideout Feb. 10, 2004

Methods   
__cmp__
__init__
__str__
_getRealExperimentUrl
  __cmp__ 
__cmp__ ( self,  other )

__cmp__ compares two MadrigalExperiment objects.

Compared by start time, then by end time.

  __init__ 
__init__ (
        self,
        id,
        url,
        name,
        siteid,
        sitename,
        instcode,
        instname,
        startyear,
        startmonth,
        startday,
        starthour,
        startmin,
        startsec,
        endyear,
        endmonth,
        endday,
        endhour,
        endmin,
        endsec,
        isLocal,
        madrigalUrl,
        pi,
        piEmail,
        uttimestamp,
        access,
        )

__init__ initializes a MadrigalExperiment.

Inputs:

            id (int, or string that can be converted) Example: 10000111.  Uniquely identifies experiment.

            url (string) Example: 'http://madrigal.haystack.mit.edu/cgi-bin/madtoc/1997/mlh/03dec97' - see 
                realUrl attribute for an actual url that works in the web

            name (string) Example: 'Wide Latitude Substorm Study'

            siteid (int, or string that can be converted) Example: 1

            sitename (string) Example: 'Millstone Hill Observatory'

            instcode (int, or string that can be converted) Code of instrument. Example: 30

            instname (string) Instrument name. Example: 'Millstone Hill Incoherent Scatter Radar'

            startyear - int, or string that can be converted

            startmonth - int, or string that can be converted

            startday - int, or string that can be converted

            starthour - int, or string that can be converted

            startmin - int, or string that can be converted

            startsec - int, or string that can be converted

            endyear - int, or string that can be converted

            endmonth - int, or string that can be converted

            endday - int, or string that can be converted

            endhour - int, or string that can be converted

            endmin - int, or string that can be converted

            endsec - int, or string that can be converted

            isLocal - True if a local experiment, False if not

            madrigalUrl - url of Madrigal site.  Used if not a local experiment.

            pi - experiment PI

            piEmail - experiment PI email

            uttimestamp - st_mtime of expDir. None if not supported by the Madrigal site

            access - access code of the experiment (0 if public, 2 if public).  None if not
                supported by the Madrigal site.

Returns: void

Affects: Initializes all the class member variables.

Exceptions: If illegal argument passed in.

Exceptions   
ValueError, 'In MadrigalExperiment, instname not string type: %s' %(str( instname ) )
ValueError, 'In MadrigalExperiment, isLocal not boolean: %s' %(str( isLocal ) )
ValueError, 'In MadrigalExperiment, madrigalUrl not string type: %s' %(str( madrigalUrl ) )
ValueError, 'In MadrigalExperiment, name not string type: %s' %(str( name ) )
ValueError, 'In MadrigalExperiment, sitename not string type: %s' %(str( sitename ) )
ValueError, 'In MadrigalExperiment, url not string type: %s' %(str( url ) )
  __str__ 
__str__ ( self )

return a readible form of this object

  _getRealExperimentUrl 
_getRealExperimentUrl ( self )

getRealExperimentUrl is a private method that returns the url used in a web browser to see this experiment's page in full data access interface. Uses to create attribute realUrl


Table of Contents

This document was automatically generated on Wed Jul 30 15:08:34 2014 by HappyDoc version r1_5