astro.services.qualitywise package

Submodules

astro.services.qualitywise.HtmlQualityWISE module

author : J.P. McFarland <mcfarland@astro.rug.nl> Python file for generating QualityWISE html

class astro.services.qualitywise.HtmlQualityWISE.HtmlQualityWISE(args)

Bases: common.services.general.HtmlBase.HtmlBase, object

author_email = 'mcfarland@astro.rug.nl'
author_name = 'J.P. McFarland'
begin_database()
check_preconditions()
end_database(message='')
getHtml()

Generate html output

get_objects()
get_profile()
classmethod get_url(object_str, object_id, project=None, quality_server='quality.astro-wise.org')

Construct the QualityWISE URL

object_str: name of the class (i.e. cls.__class__.__name__)
object_id: OID of the instance (i.e., obj.object_id.binary())
project: name of the database project

quality_server: hostname of the QualityWISE server machine

grey

Attribute to store the grey and allow it to be toggled

make_body()
make_header()
set_validity()
astro.services.qualitywise.HtmlQualityWISE.am2zdstr(am)

convert airmass to zenith distance in degrees

astro.services.qualitywise.HtmlQualityWISE.deg2dms(dec_deg)

convert Dec. in degrees to string of dd:mm:ss format

astro.services.qualitywise.HtmlQualityWISE.deg2hms(ra_deg)

convert R.A. in degrees to string of hh:mm:ss format

astro.services.qualitywise.HtmlQualityWISE.dt2str(dt, iso=True, empty='&nbsp;')

convert datetime object to pseudo-ISO format “YYYY-MM-DD hh:mm:ss”

dt: datetime.datetime object
iso: if False, return “dd month YYYY hh:mm:ss” format instead of
ISO
astro.services.qualitywise.HtmlQualityWISE.my_getattr(obj, name, default=None, format='')

Expanded getattr builtin to allow for unlimited depth of attribute.

A hierarchical attribute name has the form ‘a.b.c’, such that the call:

> my_getattr(obj, ‘a.b.c’)

is equivalent to:

> getattr(getattr(getattr(obj, ‘a’), b), c)

The function is recursive, so an unlimited depth is allowed.

obj : object
Base object from which to get attribute.
name : str
Hierarchical attribute of which to retrieve value.
default : str
Value to return if the attribute is not found.
format : str
Format string for str output.
object
The value found in nested attribute, optionally formatted, else the default.
astro.services.qualitywise.HtmlQualityWISE.overlibstr(string)
astro.services.qualitywise.HtmlQualityWISE.zd2am(zd)

convert zenith distance in degrees to airmass

Module contents

QualityWISE web service