pyelq 1.1.3__tar.gz → 1.1.4__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. {pyelq-1.1.3 → pyelq-1.1.4}/PKG-INFO +1 -1
  2. {pyelq-1.1.3 → pyelq-1.1.4}/pyproject.toml +1 -1
  3. {pyelq-1.1.3 → pyelq-1.1.4}/src/pyelq/plotting/plot.py +15 -25
  4. {pyelq-1.1.3 → pyelq-1.1.4}/LICENSE.md +0 -0
  5. {pyelq-1.1.3 → pyelq-1.1.4}/LICENSES/Apache-2.0.txt +0 -0
  6. {pyelq-1.1.3 → pyelq-1.1.4}/README.md +0 -0
  7. {pyelq-1.1.3 → pyelq-1.1.4}/src/pyelq/__init__.py +0 -0
  8. {pyelq-1.1.3 → pyelq-1.1.4}/src/pyelq/component/__init__.py +0 -0
  9. {pyelq-1.1.3 → pyelq-1.1.4}/src/pyelq/component/background.py +0 -0
  10. {pyelq-1.1.3 → pyelq-1.1.4}/src/pyelq/component/component.py +0 -0
  11. {pyelq-1.1.3 → pyelq-1.1.4}/src/pyelq/component/error_model.py +0 -0
  12. {pyelq-1.1.3 → pyelq-1.1.4}/src/pyelq/component/offset.py +0 -0
  13. {pyelq-1.1.3 → pyelq-1.1.4}/src/pyelq/component/source_model.py +0 -0
  14. {pyelq-1.1.3 → pyelq-1.1.4}/src/pyelq/coordinate_system.py +0 -0
  15. {pyelq-1.1.3 → pyelq-1.1.4}/src/pyelq/data_access/__init__.py +0 -0
  16. {pyelq-1.1.3 → pyelq-1.1.4}/src/pyelq/data_access/data_access.py +0 -0
  17. {pyelq-1.1.3 → pyelq-1.1.4}/src/pyelq/dispersion_model/__init__.py +0 -0
  18. {pyelq-1.1.3 → pyelq-1.1.4}/src/pyelq/dispersion_model/gaussian_plume.py +0 -0
  19. {pyelq-1.1.3 → pyelq-1.1.4}/src/pyelq/dlm.py +0 -0
  20. {pyelq-1.1.3 → pyelq-1.1.4}/src/pyelq/gas_species.py +0 -0
  21. {pyelq-1.1.3 → pyelq-1.1.4}/src/pyelq/meteorology.py +0 -0
  22. {pyelq-1.1.3 → pyelq-1.1.4}/src/pyelq/model.py +0 -0
  23. {pyelq-1.1.3 → pyelq-1.1.4}/src/pyelq/plotting/__init__.py +0 -0
  24. {pyelq-1.1.3 → pyelq-1.1.4}/src/pyelq/preprocessing.py +0 -0
  25. {pyelq-1.1.3 → pyelq-1.1.4}/src/pyelq/sensor/__init__.py +0 -0
  26. {pyelq-1.1.3 → pyelq-1.1.4}/src/pyelq/sensor/beam.py +0 -0
  27. {pyelq-1.1.3 → pyelq-1.1.4}/src/pyelq/sensor/satellite.py +0 -0
  28. {pyelq-1.1.3 → pyelq-1.1.4}/src/pyelq/sensor/sensor.py +0 -0
  29. {pyelq-1.1.3 → pyelq-1.1.4}/src/pyelq/source_map.py +0 -0
  30. {pyelq-1.1.3 → pyelq-1.1.4}/src/pyelq/support_functions/__init__.py +0 -0
  31. {pyelq-1.1.3 → pyelq-1.1.4}/src/pyelq/support_functions/post_processing.py +0 -0
  32. {pyelq-1.1.3 → pyelq-1.1.4}/src/pyelq/support_functions/spatio_temporal_interpolation.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: pyelq
3
- Version: 1.1.3
3
+ Version: 1.1.4
4
4
  Summary: Package for detection, localization and quantification code.
5
5
  License: Apache-2.0
6
6
  Keywords: gas dispersion,emission,detection,localization,quantification
@@ -8,7 +8,7 @@ build-backend = "poetry.core.masonry.api"
8
8
 
9
9
  [tool.poetry]
10
10
  name = "pyelq"
11
- version = "1.1.3"
11
+ version = "1.1.4"
12
12
  description = "Package for detection, localization and quantification code."
13
13
  authors = ["Bas van de Kerkhof", "Matthew Jones", "David Randell"]
14
14
  homepage = "https://sede-open.github.io/pyELQ/"
@@ -978,6 +978,7 @@ class Plot:
978
978
  normalized_count_limit: float = 0.005,
979
979
  burn_in: int = 0,
980
980
  show_summary_results: bool = True,
981
+ show_fixed_source_locations: bool = True,
981
982
  ):
982
983
  """Function to create a map with the quantification results of the model object.
983
984
 
@@ -996,6 +997,8 @@ class Plot:
996
997
  burn_in (int, optional): Number of burn-in iterations to discard before calculating the statistics.
997
998
  Defaults to 0.
998
999
  show_summary_results (bool, optional): Flag to show the summary results on the map. Defaults to True.
1000
+ show_fixed_source_locations (bool, optional): Flag to show the fixed sources location when present in one
1001
+ of the sourcemaps. Defaults to True.
999
1002
 
1000
1003
  """
1001
1004
  if source_model_to_plot_key is None:
@@ -1109,33 +1112,20 @@ class Plot:
1109
1112
  sensor_object.plot_sensor_location(self.figure_dict["iqr_map"])
1110
1113
  self.figure_dict["iqr_map"].update_traces(showlegend=False)
1111
1114
 
1112
- colormap_fixed = px.colors.qualitative.G10
1113
- marker_dict = {"size": 10, "opacity": 0.8}
1114
- for key, _ in model_object.components.items():
1115
- if bool(re.search("fixed", key)):
1116
- source_model_fixed = model_object.components[key]
1117
- source_locations_fixed = source_model_fixed.all_source_locations
1118
- source_location_fixed_lla = source_locations_fixed.to_lla()
1119
- source_location_fixed_average = LLA(
1120
- latitude=np.nanmean(source_location_fixed_lla.latitude, axis=1),
1121
- longitude=np.nanmean(source_location_fixed_lla.longitude, axis=1),
1122
- altitude=np.nanmean(source_location_fixed_lla.altitude, axis=1),
1123
- )
1124
-
1125
- for lat_fixed, lon_fixed, label_fixed in zip(
1126
- source_location_fixed_average.latitude,
1127
- source_location_fixed_average.longitude,
1128
- source_model_fixed.individual_source_labels,
1129
- ):
1130
- color_idx = source_model_fixed.individual_source_labels.index(label_fixed)
1131
- marker_dict["color"] = colormap_fixed[color_idx % len(colormap_fixed)]
1132
-
1115
+ if show_fixed_source_locations:
1116
+ for key, _ in model_object.components.items():
1117
+ if bool(re.search("fixed", key)):
1118
+ source_model_fixed = model_object.components[key]
1119
+ source_locations_fixed = source_model_fixed.all_source_locations
1120
+ source_location_fixed_lla = source_locations_fixed.to_lla()
1121
+ sources_lat = source_location_fixed_lla.latitude[:, 0]
1122
+ sources_lon = source_location_fixed_lla.longitude[:, 0]
1133
1123
  fixed_source_location_trace = go.Scattermap(
1134
1124
  mode="markers",
1135
- lon=np.array(lon_fixed),
1136
- lat=np.array(lat_fixed),
1137
- name=label_fixed,
1138
- marker=marker_dict,
1125
+ lon=sources_lon,
1126
+ lat=sources_lat,
1127
+ name=f"Fixed source locations, {key}",
1128
+ marker={"size": 10, "opacity": 0.8},
1139
1129
  )
1140
1130
  self.figure_dict["count_map"].add_trace(fixed_source_location_trace)
1141
1131
  self.figure_dict["median_map"].add_trace(fixed_source_location_trace)
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes