Welcome to VOEventLib’s documentation!
The library is split into two parts. The largest part is auto-generated from
the VOEvent schema, and presents hierarchical view of the structure, with get
and set methods, as well as add and insert for the list based elements.
The Vutil is a utility library that adds some sugar methods and an alternate
representation of table by column name and row index.
The Vutil utility library
-
class VOEventLib.Vutil.VOEventExportClass(event, schemaURL)
-
VOEventLib.Vutil.findParam(event, groupName, paramName)
Finds a Param in a given VOEvent that has the specified groupName
and paramName. If it is a bare param, the group name is the empty string.
-
VOEventLib.Vutil.getParamNames(v)
Takes a VOEvent and produces a list of pairs of group name and param name.
For a bare param, the group name is the empty string.
-
VOEventLib.Vutil.getWhereWhen(v)
Builds a dictionary of the information in the WhereWhen section:
observatory: location of observatory (string);
coord_system: coordinate system ID, for example UTC-FK5-GEO;
time: ISO8601 representation of time, for example 1918-11-11T11:11:11;
timeError: in seconds;
longitude: in degrees, usually right ascension;
latitiude: in degrees, usually declination;
positionalError: positional error in degrees.
-
VOEventLib.Vutil.htmlList(list)
Converts a list of strings to an HTML <ul><li> structure.
-
VOEventLib.Vutil.htmlParam(g, p)
Builds an HTML table row from a Param and its enclosing Group (or None)
-
VOEventLib.Vutil.makeWhereWhen(wwd)
Expects a dictionary of the information in the WhereWhen section, and makes a
VOEvent.WhereWhen object suitable for set_WhereWhen().
observatory: location of observatory (string);
coord_system: coordinate system ID, for example UTC-FK5-GEO;
time: ISO8601 representation of time, for example 1918-11-11T11:11:11;
timeError: in seconds;
longitude: in degrees, usually right ascension;
latitiude: in degrees, usually declination;
positionalError: positional error in degrees.
-
VOEventLib.Vutil.paramValue(p)
-
VOEventLib.Vutil.parse(file)
Parses a file and builds the VOEvent DOM.
-
VOEventLib.Vutil.parseString(inString)
Parses a string and builds the VOEvent DOM.
-
VOEventLib.Vutil.stringVOEvent(event, schemaURL='http://www.ivoa.net/xml/VOEvent/VOEvent-v2.0.xsd')
Converts a VOEvent to a string suitable for output
-
class VOEventLib.Vutil.utilityTable(table)
Class to represent a simple Table from VOEvent
-
blankTable(nrows)
From a table template, replaces the Data section with nrows of empty TR and TD
-
getByCols()
Returns a dictionary of column vectors that represent the table.
The key for the dict is the Field name for that column.
-
getTable()
-
setValue(name, irow, value, out=<open file '<stdout>', mode 'w' at 0x1004160b8>)
Copies a single value into a cell of the table.
The column is identified by its name, and the row by an index 0,1,2...
-
toString()
Makes a crude string representation of a utilityTable
The VOEvent base library
-
class VOEventLib.VOEvent.AstroCoordSystem(id=None, valueOf_=None)
Part of WhereWhen
-
get_id()
-
get_valueOf_()
-
set_id(id)
-
set_valueOf_(valueOf_)
-
validate_idValues(value)
-
class VOEventLib.VOEvent.AstroCoords(coord_system_id=None, Time=None, Position2D=None, Position3D=None)
Part of WhereWhen
-
get_Position2D()
-
get_Position3D()
-
get_Time()
-
get_coord_system_id()
-
set_Position2D(Position2D)
-
set_Position3D(Position3D)
-
set_Time(Time)
-
set_coord_system_id(coord_system_id)
-
validate_idValues(value)
-
class VOEventLib.VOEvent.Author(title=None, shortName=None, logoURL=None, contactName=None, contactEmail=None, contactPhone=None, contributor=None)
Author information follows the IVOA curation information schema: the
organization responsible for the packet can have a title, short
name or acronym, and a logo. A contact person has a name, email,
and phone number. Other contributors can also be noted.
-
add_contactEmail(value)
-
add_contactName(value)
-
add_contactPhone(value)
-
add_contributor(value)
-
add_logoURL(value)
-
add_shortName(value)
-
add_title(value)
-
get_contactEmail()
-
get_contactName()
-
get_contactPhone()
-
get_contributor()
-
get_logoURL()
-
get_shortName()
-
get_title()
-
insert_contactEmail(index, value)
-
insert_contactName(index, value)
-
insert_contactPhone(index, value)
-
insert_contributor(index, value)
-
insert_logoURL(index, value)
-
insert_shortName(index, value)
-
insert_title(index, value)
-
set_contactEmail(contactEmail)
-
set_contactName(contactName)
-
set_contactPhone(contactPhone)
-
set_contributor(contributor)
-
set_logoURL(logoURL)
-
set_shortName(shortName)
-
set_title(title)
-
class VOEventLib.VOEvent.Citations(EventIVORN=None, Description=None)
Citations: Follow-up Observations. This section is a sequence of
EventIVORN elements, each of which has the IVORN of a cited
event.
-
add_EventIVORN(value)
-
get_Description()
-
get_EventIVORN()
-
insert_EventIVORN(index, value)
-
set_Description(Description)
-
set_EventIVORN(EventIVORN)
-
class VOEventLib.VOEvent.Data(TR=None)
-
add_TR(value)
-
get_TR()
-
insert_TR(index, value)
-
set_TR(TR)
-
class VOEventLib.VOEvent.EventIVORN(cite=None, valueOf_=None)
Citations/EventIVORN. The value is the IVORN of the cited event, the
‘cite’ attribute is the nature of that relationship, choosing
from ‘followup’, ‘supersedes’, or ‘retraction’.
-
get_cite()
-
get_valueOf_()
-
set_cite(cite)
-
set_valueOf_(valueOf_)
-
validate_citeValues(value)
-
class VOEventLib.VOEvent.Field(dataType='string', utype=None, ucd=None, name=None, unit=None, Description=None, Reference=None)
-
add_Description(value)
-
add_Reference(value)
-
get_Description()
-
get_Reference()
-
get_dataType()
-
get_name()
-
get_ucd()
-
get_unit()
-
get_utype()
-
insert_Description(index, value)
-
insert_Reference(index, value)
-
set_Description(Description)
-
set_Reference(Reference)
-
set_dataType(dataType)
-
set_name(name)
-
set_ucd(ucd)
-
set_unit(unit)
-
set_utype(utype)
-
validate_dataType(value)
-
class VOEventLib.VOEvent.Group(type_=None, name=None, Param=None, Description=None, Reference=None)
What/Group definition: A group is a collection of Params, with name
and type attributes.
-
add_Description(value)
-
add_Param(value)
-
add_Reference(value)
-
get_Description()
-
get_Param()
-
get_Reference()
-
get_name()
-
get_type()
-
insert_Description(index, value)
-
insert_Param(index, value)
-
insert_Reference(index, value)
-
set_Description(Description)
-
set_Param(Param)
-
set_Reference(Reference)
-
set_name(name)
-
set_type(type_)
-
class VOEventLib.VOEvent.How(Description=None, Reference=None)
How: Instrument Configuration. Built with some Description and
Reference elements.
-
add_Description(value)
-
add_Reference(value)
-
get_Description()
-
get_Reference()
-
insert_Description(index, value)
-
insert_Reference(index, value)
-
set_Description(Description)
-
set_Reference(Reference)
-
class VOEventLib.VOEvent.Inference(relation=None, probability=None, Name=None, Concept=None, Description=None, Reference=None)
Why/Inference: A container for a more nuanced expression, including
relationships and probability.
-
add_Concept(value)
-
add_Description(value)
-
add_Name(value)
-
add_Reference(value)
-
get_Concept()
-
get_Description()
-
get_Name()
-
get_Reference()
-
get_probability()
-
get_relation()
-
insert_Concept(index, value)
-
insert_Description(index, value)
-
insert_Name(index, value)
-
insert_Reference(index, value)
-
set_Concept(Concept)
-
set_Description(Description)
-
set_Name(Name)
-
set_Reference(Reference)
-
set_probability(probability)
-
set_relation(relation)
-
validate_smallFloat(value)
-
class VOEventLib.VOEvent.MemberSpec_(name='', data_type='', container=0)
-
get_container()
-
get_data_type()
-
get_data_type_chain()
-
get_name()
-
set_container(container)
-
set_data_type(data_type)
-
set_name(name)
-
class VOEventLib.VOEvent.MixedContainer(category, content_type, name, value)
-
getCategory()
-
getContenttype(content_type)
-
getName()
-
getValue()
-
class VOEventLib.VOEvent.ObsDataLocation(ObservatoryLocation=None, ObservationLocation=None)
Part of WhereWhen
-
get_ObservationLocation()
-
get_ObservatoryLocation()
-
set_ObservationLocation(ObservationLocation)
-
set_ObservatoryLocation(ObservatoryLocation)
-
class VOEventLib.VOEvent.ObservationLocation(AstroCoordSystem=None, AstroCoords=None)
Part of WhereWhen
-
get_AstroCoordSystem()
-
get_AstroCoords()
-
set_AstroCoordSystem(AstroCoordSystem)
-
set_AstroCoords(AstroCoords)
-
class VOEventLib.VOEvent.ObservatoryLocation(id=None, AstroCoordSystem=None, AstroCoords=None)
Part of WhereWhen
-
get_AstroCoordSystem()
-
get_AstroCoords()
-
get_id()
-
set_AstroCoordSystem(AstroCoordSystem)
-
set_AstroCoords(AstroCoords)
-
set_id(id)
-
class VOEventLib.VOEvent.Param(name=None, dataType='string', value=None, utype=None, ucd=None, unit=None, Description=None, Reference=None, Value=None)
What/Param definition. A Param has name, value, ucd, unit, dataType;
and may have Description and Reference.
-
add_Description(value)
-
add_Reference(value)
-
get_Description()
-
get_Reference()
-
get_Value()
-
get_dataType()
-
get_name()
-
get_ucd()
-
get_unit()
-
get_utype()
-
get_value()
-
insert_Description(index, value)
-
insert_Reference(index, value)
-
set_Description(Description)
-
set_Reference(Reference)
-
set_Value(Value)
-
set_dataType(dataType)
-
set_name(name)
-
set_ucd(ucd)
-
set_unit(unit)
-
set_utype(utype)
-
set_value(value)
-
validate_dataType(value)
-
class VOEventLib.VOEvent.Position2D(unit=None, Name1=None, Name2=None, Value2=None, Error2Radius=None)
Part of WhereWhen
-
get_Error2Radius()
-
get_Name1()
-
get_Name2()
-
get_Value2()
-
get_unit()
-
set_Error2Radius(Error2Radius)
-
set_Name1(Name1)
-
set_Name2(Name2)
-
set_Value2(Value2)
-
set_unit(unit)
-
class VOEventLib.VOEvent.Position3D(unit=None, Name1=None, Name2=None, Name3=None, Value3=None)
Part of WhereWhen
-
get_Name1()
-
get_Name2()
-
get_Name3()
-
get_Value3()
-
get_unit()
-
set_Name1(Name1)
-
set_Name2(Name2)
-
set_Name3(Name3)
-
set_Value3(Value3)
-
set_unit(unit)
-
class VOEventLib.VOEvent.Reference(mimetype=None, meaning=None, type_=None, uri=None, valueOf_=None)
Reference: External Content. The payload is the uri, and the
‘meaning’ describes the nature of the data under that uri. The
Reference can also have a mimetype.
-
get_meaning()
-
get_mimetype()
-
get_type()
-
get_uri()
-
get_valueOf_()
-
set_meaning(meaning)
-
set_mimetype(mimetype)
-
set_type(type_)
-
set_uri(uri)
-
set_valueOf_(valueOf_)
-
class VOEventLib.VOEvent.TR(TD=None)
-
add_TD(value)
-
get_TD()
-
insert_TD(index, value)
-
set_TD(TD)
-
class VOEventLib.VOEvent.Table(type_=None, name=None, Description=None, Reference=None, Param=None, Field=None, Data=None)
What/Table definition. This small Table has Fields for the column
definitions, and Data to hold the table data, with TR for row
and TD for value of a table cell.
-
add_Description(value)
-
add_Field(value)
-
add_Param(value)
-
add_Reference(value)
-
get_Data()
-
get_Description()
-
get_Field()
-
get_Param()
-
get_Reference()
-
get_name()
-
get_type()
-
insert_Description(index, value)
-
insert_Field(index, value)
-
insert_Param(index, value)
-
insert_Reference(index, value)
-
set_Data(Data)
-
set_Description(Description)
-
set_Field(Field)
-
set_Param(Param)
-
set_Reference(Reference)
-
set_name(name)
-
set_type(type_)
-
class VOEventLib.VOEvent.Time(unit=None, TimeInstant=None, Error=None)
Part of WhereWhen
-
add_Error(value)
-
add_TimeInstant(value)
-
get_Error()
-
get_TimeInstant()
-
get_unit()
-
insert_Error(index, value)
-
insert_TimeInstant(index, value)
-
set_Error(Error)
-
set_TimeInstant(TimeInstant)
-
set_unit(unit)
-
class VOEventLib.VOEvent.TimeInstant(ISOTime=None, TimeOffset=None, TimeScale=None)
Part of WhereWhen
-
get_ISOTime()
-
get_TimeOffset()
-
get_TimeScale()
-
set_ISOTime(ISOTime)
-
set_TimeOffset(TimeOffset)
-
set_TimeScale(TimeScale)
-
class VOEventLib.VOEvent.VOEvent(version=None, role='observation', ivorn=None, Who=None, What=None, WhereWhen=None, How=None, Why=None, Citations=None, Description=None, Reference=None)
VOEvent is the root element for describing observations of immediate
astronomical events. For more information, see
http://www.ivoa.net/twiki/bin/view/IVOA/IvoaVOEvent. The event
consists of at most one of each of: Who, What, WhereWhen, How,
Why, Citations, Description, and Reference.
-
get_Citations()
-
get_Description()
-
get_How()
-
get_Reference()
-
get_What()
-
get_WhereWhen()
-
get_Who()
-
get_Why()
-
get_ivorn()
-
get_role()
-
get_version()
-
set_Citations(Citations)
-
set_Description(Description)
-
set_How(How)
-
set_Reference(Reference)
-
set_What(What)
-
set_WhereWhen(WhereWhen)
-
set_Who(Who)
-
set_Why(Why)
-
set_ivorn(ivorn)
-
set_role(role)
-
set_version(version)
-
validate_roleValues(value)
-
class VOEventLib.VOEvent.Value2(C1=None, C2=None)
Part of WhereWhen
-
get_C1()
-
get_C2()
-
set_C1(C1)
-
set_C2(C2)
-
class VOEventLib.VOEvent.Value3(C1=None, C2=None, C3=None)
Part of WhereWhen
-
get_C1()
-
get_C2()
-
get_C3()
-
set_C1(C1)
-
set_C2(C2)
-
set_C3(C3)
-
class VOEventLib.VOEvent.What(Param=None, Group=None, Table=None, Description=None, Reference=None)
What: Event Characterization. This is the part of the data model
that is chosen by the Authoer of the event rather than the IVOA.
There can be Params, that may be in Groups, and Tables, and
simpleTimeSeries. There can also be Description and Reference as
with most VOEvent elements.
-
add_Description(value)
-
add_Group(value)
-
add_Param(value)
-
add_Reference(value)
-
add_Table(value)
-
get_Description()
-
get_Group()
-
get_Param()
-
get_Reference()
-
get_Table()
-
insert_Description(index, value)
-
insert_Group(index, value)
-
insert_Param(index, value)
-
insert_Reference(index, value)
-
insert_Table(index, value)
-
set_Description(Description)
-
set_Group(Group)
-
set_Param(Param)
-
set_Reference(Reference)
-
set_Table(Table)
-
class VOEventLib.VOEvent.WhereWhen(id=None, ObsDataLocation=None, Description=None, Reference=None)
WhereWhen: Space-Time Coordinates. Lots and lots of elements here,
but the import is that each event has these: observatory,
coord_system, time, timeError, longitude, latitude, posError.
-
add_Description(value)
-
add_Reference(value)
-
get_Description()
-
get_ObsDataLocation()
-
get_Reference()
-
get_id()
-
insert_Description(index, value)
-
insert_Reference(index, value)
-
set_Description(Description)
-
set_ObsDataLocation(ObsDataLocation)
-
set_Reference(Reference)
-
set_id(id)
-
class VOEventLib.VOEvent.Who(AuthorIVORN=None, Date=None, Description=None, Reference=None, Author=None)
Who: Curation Metadata
-
get_Author()
-
get_AuthorIVORN()
-
get_Date()
-
get_Description()
-
get_Reference()
-
set_Author(Author)
-
set_AuthorIVORN(AuthorIVORN)
-
set_Date(Date)
-
set_Description(Description)
-
set_Reference(Reference)
-
class VOEventLib.VOEvent.Why(importance=None, expires=None, Name=None, Concept=None, Inference=None, Description=None, Reference=None)
Why: Initial Scientific Assessment. Can make simple
Concept/Name/Desc/Ref for the inference or use multiple
Inference containers for more semantic sophistication.
-
add_Concept(value)
-
add_Description(value)
-
add_Inference(value)
-
add_Name(value)
-
add_Reference(value)
-
get_Concept()
-
get_Description()
-
get_Inference()
-
get_Name()
-
get_Reference()
-
get_expires()
-
get_importance()
-
insert_Concept(index, value)
-
insert_Description(index, value)
-
insert_Inference(index, value)
-
insert_Name(index, value)
-
insert_Reference(index, value)
-
set_Concept(Concept)
-
set_Description(Description)
-
set_Inference(Inference)
-
set_Name(Name)
-
set_Reference(Reference)
-
set_expires(expires)
-
set_importance(importance)
-
VOEventLib.VOEvent.get_all_text_(node)
-
VOEventLib.VOEvent.get_root_tag(node)
-
VOEventLib.VOEvent.parse(inFileName)
-
VOEventLib.VOEvent.parseLiteral(inFileName)
-
VOEventLib.VOEvent.parseString(inString)
-
VOEventLib.VOEvent.parsexml_(*args, **kwargs)
-
VOEventLib.VOEvent.showIndent(outfile, level)