added veiws for area and single waveforms added settings dialog added MenuBar and populated with "View" "Settings" and "Help" Help menu contains "About" currently ** ** WILL NOT RUN due to rewrite being incomplete ** **
252 lines
6.8 KiB
Python
252 lines
6.8 KiB
Python
"""
|
|
THIS IS A DICTIONARY that maps a sensot type to a list of available channels for that type
|
|
"""
|
|
SENSOR_TYPE_CHANNELS = {
|
|
"Broadband": ["BHZ", "BHN", "BHE", "HHZ", "HHN", "HHE", "LHZ", "LHN", "LHE"],
|
|
"Short Period": ["EHZ", "EHN", "EHE", "SHZ", "SHN", "SHE"],
|
|
"Strong Motion": ["HNZ", "HNN", "HNE"],
|
|
"All Channels": []
|
|
}
|
|
|
|
#List of all known stations with their details
|
|
# Each Station is a DICTIONARY
|
|
ALL_STATIONS_CONFIG = [
|
|
{
|
|
"code": "RIZ",
|
|
"name": "Bells Beach, Raoul Is.",
|
|
"location_codes": {
|
|
"HH": "10",
|
|
"LH": "10",
|
|
"default": "10"
|
|
},
|
|
"types": ["Broadband"],
|
|
"area_tags": ["Raoul Island", "Bells Beach" "Hikaurangi Trench"]
|
|
},
|
|
{
|
|
"code": "GLKZ",
|
|
"name": "Green Lake, Raoul Is.",
|
|
"location_codes": {
|
|
"HH": "10",
|
|
"LH": "10",
|
|
"default": "10"
|
|
},
|
|
"types": ["Broadband"],
|
|
"area_tags": ["Raoul Island", "Green Lake", "Hikaurangi Trench"]
|
|
},
|
|
{
|
|
"code": "MXZ",
|
|
"name": "Te Araroa",
|
|
"location_codes": {
|
|
"HH": "10",
|
|
"LH": "10",
|
|
"default": "10"
|
|
},
|
|
"types": ["Broadband"],
|
|
"area_tags": ["East Coast", "Te Araroa", "North Island", "Hikaurangi Trench"]
|
|
},
|
|
{
|
|
"code": "WMGZ",
|
|
"name": "Ruatoria",
|
|
"location_codes": {
|
|
"EH": "10",
|
|
"default": "10"
|
|
},
|
|
"types": ["Short Period"],
|
|
"area_tags": ["East Coast", "Ruatoria", "North Island", "Hikaurangi Trench"]
|
|
},
|
|
{
|
|
"code": "PUZ",
|
|
"name": "Tokomaru Bay",
|
|
"location_codes": {
|
|
"HH": "10",
|
|
"LH": "10",
|
|
"default": "10"
|
|
},
|
|
"types": ["Broadband"],
|
|
"area_tags": ["East Coast", "Tokomaru Bay", "North Island", "Hikaurangi Trench"]
|
|
},
|
|
{
|
|
"code": "CNGZ",
|
|
"name": "Tologa Bay",
|
|
"location_codes": {
|
|
"EH": "10",
|
|
"default": "10"
|
|
},
|
|
"types": ["Shot Period"],
|
|
"area_tags": ["East Coast", "Tologa Bay", "Hikaurangi Trench", "North Island"]
|
|
},
|
|
{
|
|
"code": "RIGZ",
|
|
"name": "Gisborne",
|
|
"location_codes": {
|
|
"EH": "10",
|
|
"default": "10"
|
|
},
|
|
"types": ["Short Period"],
|
|
"area_tags": ["Gisborne", "East Coast", "Hikaurangi Trench", "North Island"]
|
|
},
|
|
{
|
|
"code": "PRGZ",
|
|
"name": "Tikiwhata",
|
|
"location_codes": {
|
|
"EH": "10",
|
|
"default": "10"
|
|
},
|
|
"types": ["Short Period"],
|
|
"area_tags": ["East Coast", "Tikiwhata", "Hikaurangi Trench", "North Island"]
|
|
},
|
|
{
|
|
"code": "KNZ",
|
|
"name": "Wairoa",
|
|
"location_codes": {
|
|
"HH": "10",
|
|
"LH": "10",
|
|
"default": "10"
|
|
},
|
|
"types": ["Broadband"],
|
|
"area_tags": ["Wairoa", "East Coast", "Hikaurangi Trench", "North Island"]
|
|
},
|
|
{
|
|
"code": "WHHZ",
|
|
"name": "Waihua",
|
|
"location_codes": {
|
|
"EH": "10",
|
|
"default": "10"
|
|
},
|
|
"types": ["Short Period"],
|
|
"area_tags": ["Waihua", "East Coast", "Hikaurangi Trench", "North Island"]
|
|
},
|
|
{
|
|
"code": "ARHZ",
|
|
"name": "Aropaonui",
|
|
"location_codes": {
|
|
"EH": "10",
|
|
"default": "10"
|
|
},
|
|
"types": ["Short Period"],
|
|
"area_tags": ["East Coast", "Aropaonui", "Hikaurangi Trench", "North Island"]
|
|
},
|
|
{
|
|
"code": "CKHZ",
|
|
"name": "Cape Kidnappers",
|
|
"location_codes": {
|
|
"EH": "10",
|
|
"default": "10"
|
|
},
|
|
"types": ["Short Period"],
|
|
"area_tags": ["Cape Kidnappers", "East Coast", "Hikaurangi Trench", "North Island"]
|
|
},
|
|
{
|
|
"code": "KAHZ",
|
|
"name": "Tukituki",
|
|
"location_codes": {
|
|
"EH": "10",
|
|
"default": "10"
|
|
},
|
|
"types": ["Short Period"],
|
|
"area_tags": ["Tukituki", "East Coast", "Hikaurangi Trench", "North Island"]
|
|
},
|
|
{
|
|
"code": "PXZ",
|
|
"name": "Pawanui",
|
|
"location_codes": {
|
|
"HH": "10",
|
|
"LH": "10",
|
|
"default": "10"
|
|
},
|
|
"types": ["Broadband"],
|
|
"area_tags": ["Pawanui", "East Coast", "Hikaurangi Trench", "North Island"]
|
|
},
|
|
{
|
|
"code": "PRHZ",
|
|
"name": "Porangahau",
|
|
"location_codes": {
|
|
"EH": "10",
|
|
"default": "10"
|
|
},
|
|
"types": ["Short Period"],
|
|
"area_tags": ["Porangahau", "East Coast", "Hikaurangi Trench", "North Island"]
|
|
},
|
|
{
|
|
"code": "BFZ",
|
|
"name": "Birch Farm",
|
|
"location_codes": {
|
|
"HH": "10",
|
|
"LH": "10",
|
|
"default": "10"
|
|
},
|
|
"types": ["Broadband"],
|
|
"area_tags": ["Birch Farm", "Hikaurangi Trench", "North Island"]
|
|
},
|
|
{
|
|
"code": "CPWZ",
|
|
"name": "Castlepoint",
|
|
"location_codes": {
|
|
"EH": "10",
|
|
"default": "10"
|
|
},
|
|
"types": ["Short Period"],
|
|
"area_tags": ["Castlepoint", "Hikaurangi Trench", "North Island"]
|
|
},
|
|
{
|
|
"code": "TMWZ",
|
|
"name": "Traveller",
|
|
"location_codes": {
|
|
"EH": "10",
|
|
"default": "10"
|
|
},
|
|
"types": ["Short Period"],
|
|
"area_tags": ["Traveller", "Hikaurangi Trench", "North Island"]
|
|
},
|
|
{
|
|
"code": "WRRZ",
|
|
"name": "White Rock",
|
|
"location_codes": {
|
|
"HH": "10",
|
|
"LH": "10",
|
|
"default": "10"
|
|
},
|
|
"types": ["Broadband"],
|
|
"area_tags": ["White Rock", "Hikaurangi Trench", "North Island"]
|
|
},
|
|
{
|
|
"code": "CMWZ",
|
|
"name": "Cape Campbell",
|
|
"location_codes": {
|
|
"EH": "10",
|
|
"default": "10"
|
|
},
|
|
"types": ["Short Period"],
|
|
"area_tags": ["Cape Campbell", "North Island" "Hikaurangi Trench"]
|
|
},
|
|
{
|
|
"code": "BSWZ",
|
|
"name": "Black Birch Station",
|
|
"location_codes": {
|
|
"HH": "10",
|
|
"LH": "10",
|
|
"default": "10"
|
|
},
|
|
"types": ["Broadband"],
|
|
"area_tags": ["Black Birch Station", "South Island" "Hikaurangi Trench"]
|
|
},
|
|
{
|
|
"code": "CTZ",
|
|
"name": "Chatham Islands",
|
|
"location_codes": {
|
|
"HH": "10",
|
|
"LH": "10",
|
|
"default": "10"
|
|
},
|
|
"types": ["Broadband"],
|
|
"area_tags": ["Chatham Islands", "Hikaurangi Trench"]
|
|
},
|
|
]
|
|
|
|
# Post processing for convenience
|
|
ALL_UNIQUE_CHANNELS = sorted(list(set(sum(SENSOR_TYPE_CHANNELS.values(), []))))
|
|
SENSOR_TYPE_CHANNELS["All Channels"] = ALL_UNIQUE_CHANNELS
|
|
|
|
# Pre built dictionary for quick lookup by station code
|
|
STATION_LOOKUP = {station['code']: station for station in ALL_STATIONS_CONFIG}
|