pyiem.nws.products.spcpts module#
Storm Prediction Center PTS Product Parser.
My life was not supposed to end like this, what a brutal format.
- pyiem.nws.products.spcpts.imgsrc_from_row(row)[source]#
Compute the SPC image source for a given database row.
- pyiem.nws.products.spcpts.compute_times(afos, issue, expire, day)[source]#
Compute actual issue, expire time.
For the multi-day products, the text product contains a range of dates that need translated to an actual issue and expire time.
- Returns:
issue (datetime)
expire (datetime)
- pyiem.nws.products.spcpts.get_segments_from_text(text)[source]#
Return list of segments for this text.
- pyiem.nws.products.spcpts.str2multipolygon(s)[source]#
Convert string PTS data into a polygon.
- Parameters:
s (str) – the cryptic string that we attempt to make valid polygons from
- pyiem.nws.products.spcpts.init_days(prod)[source]#
Figure out which days this product should have based on the AFOS.
- Return type:
- class pyiem.nws.products.spcpts.SPCOutlookCollection(issue, expire, day)[source]#
Bases:
objectA collection of outlooks for a single ‘day’.
- class pyiem.nws.products.spcpts.SPCOutlook(category, threshold, multipoly)[source]#
Bases:
objectA class holding what we store for a single outlook.
- class pyiem.nws.products.spcpts.SPCPTS(text, utcnow=None, ugc_provider=None, nwsli_provider=None)[source]#
Bases:
TextProductA class representing the polygons and metadata in SPC PTS Product.
- get_outlookcollection(day)[source]#
Return the SPCOutlookCollection for a given day.
- Parameters:
day (int)
- Return type:
SPCOutlookCollection | None