Browse Source

vlvd: renaming from CLVDVolume

grondown_fdsn
miili 1 year ago
parent
commit
1b70c6a243
7 changed files with 13 additions and 13 deletions
  1. +1
    -1
      setup.py
  2. +1
    -1
      src/problems/__init__.py
  3. +0
    -0
      src/problems/vlvd/__init__.py
  4. +2
    -2
      src/problems/vlvd/plot.py
  5. +5
    -5
      src/problems/vlvd/problem.py
  6. +2
    -2
      src/report/app/js/app.js
  7. +2
    -2
      src/targets/gnss_campaign/plot.py

+ 1
- 1
setup.py View File

@ -111,7 +111,7 @@ setup(
'grond.problems.double_dc',
'grond.problems.rectangular',
'grond.problems.volume_point',
'grond.problems.clvd_volume',
'grond.problems.vlvd',
'grond.optimisers',
'grond.optimisers.highscore',
'grond.analysers',


+ 1
- 1
src/problems/__init__.py View File

@ -6,4 +6,4 @@ from .cmt.problem import * # noqa
from .rectangular.problem import * # noqa
from .double_dc.problem import * # noqa
from .volume_point.problem import * # noqa
from .clvd_volume.problem import * # noqa
from .vlvd.problem import * # noqa

src/problems/clvd_volume/__init__.py → src/problems/vlvd/__init__.py View File


src/problems/clvd_volume/plot.py → src/problems/vlvd/plot.py View File

@ -2,8 +2,8 @@ from ..plot import MTLocationPlot
from pyrocko.plot import mpl_init
class CLVDVolumeLocationPlot(MTLocationPlot):
name = 'location_clvd'
class VLVDLocationPlot(MTLocationPlot):
name = 'location_vlvd'
beachball_type = 'full'
def make(self, environ):

src/problems/clvd_volume/problem.py → src/problems/vlvd/problem.py View File

@ -15,7 +15,7 @@ as_km = dict(scale_factor=km, scale_unit='km')
as_km3 = dict(scale_factor=km**3, scale_unit='km^3')
class CLVDVolumeProblemConfig(ProblemConfig):
class VLVDProblemConfig(ProblemConfig):
ranges = Dict.T(String.T(), gf.Range.T())
distance_min = Float.T(default=0.0)
nthreads = Int.T(default=1)
@ -24,14 +24,14 @@ class CLVDVolumeProblemConfig(ProblemConfig):
if event.depth is None:
event.depth = 0.
base_source = gf.CLVDVolumeSource.from_pyrocko_event(event)
base_source = gf.VLVDSource.from_pyrocko_event(event)
base_source.stf = gf.HalfSinusoidSTF(duration=event.duration or 0.0)
subs = dict(
event_name=event.name,
event_time=util.time_to_str(event.time))
problem = CLVDVolumeProblem(
problem = VLVDProblem(
name=expand_template(self.name_template, subs),
base_source=base_source,
target_groups=target_groups,
@ -45,7 +45,7 @@ class CLVDVolumeProblemConfig(ProblemConfig):
@has_get_plot_classes
class CLVDVolumeProblem(Problem):
class VLVDProblem(Problem):
problem_parameters = [
Parameter('north_shift', 'm', label='Northing', **as_km),
@ -90,5 +90,5 @@ class CLVDVolumeProblem(Problem):
def get_plot_classes(cls):
from . import plot
plots = super().get_plot_classes()
plots.extend([plot.CLVDVolumeLocationPlot])
plots.extend([plot.VLVDLocationPlot])
return plots

+ 2
- 2
src/report/app/js/app.js View File

@ -116,11 +116,11 @@ var yaml_type_map = [
['!grond.CMTProblem', Dummy],
['!grond.RectangularProblem', Dummy],
['!grond.VolumePointProblem', Dummy],
['!grond.CLVDVolumeProblem', Dummy],
['!grond.VLVDProblem', Dummy],
['!pf.MTSource', Dummy],
['!pf.RectangularSource', Dummy],
['!pf.ExplosionSource', Dummy],
['!pf.CLVDVolumeSource', Dummy],
['!pf.VLVDSource', Dummy],
['!pf.HalfSinusoidSTF', Dummy],
['!grond.PlotCollection', Dummy],
['!grond.PlotGroup', Dummy],


+ 2
- 2
src/targets/gnss_campaign/plot.py View File

@ -8,7 +8,7 @@ from pyrocko import orthodrome as od
from grond.plot.config import PlotConfig
from grond.plot.collection import PlotItem
from grond.problems import CMTProblem, RectangularProblem, \
VolumePointProblem, CLVDVolumeProblem
VolumePointProblem, VLVDProblem
from ..plot import StationDistributionPlot
@ -168,7 +168,7 @@ displacements derived from best model (red).
labels=False)
if isinstance(problem, CMTProblem) \
or isinstance(problem, CLVDVolumeProblem):
or isinstance(problem, VLVDProblem):
from pyrocko import moment_tensor
from pyrocko.plot import gmtpy


Loading…
Cancel
Save