Fri, 02 Oct 2026 12:03:25 -0500
Store subdifferential discrepancy in log
| 0 | 1 | /*! |
| 2 | Experimental setups. | |
| 3 | */ | |
| 4 | ||
|
88
51dbb2cc25d9
Move experiments away from the lib to the binary,
Tuomo Valkonen <tuomov@iki.fi>
parents:
72
diff
changeset
|
5 | use clap::{Parser, ValueEnum}; |
|
51dbb2cc25d9
Move experiments away from the lib to the binary,
Tuomo Valkonen <tuomov@iki.fi>
parents:
72
diff
changeset
|
6 | use serde::{Deserialize, Serialize}; |
|
51dbb2cc25d9
Move experiments away from the lib to the binary,
Tuomo Valkonen <tuomov@iki.fi>
parents:
72
diff
changeset
|
7 | use itertools::Itertools; |
|
51dbb2cc25d9
Move experiments away from the lib to the binary,
Tuomo Valkonen <tuomov@iki.fi>
parents:
72
diff
changeset
|
8 | use serde_with::skip_serializing_none; |
|
51dbb2cc25d9
Move experiments away from the lib to the binary,
Tuomo Valkonen <tuomov@iki.fi>
parents:
72
diff
changeset
|
9 | |
| 0 | 10 | use alg_tools::bisection_tree::*; |
| 11 | use alg_tools::error::DynResult; | |
| 12 | use alg_tools::norms::Linfinity; | |
|
61
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
13 | use std::collections::hash_map::DefaultHasher; |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
14 | use std::collections::HashMap; |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
15 | use std::hash::{Hash, Hasher}; |
|
88
51dbb2cc25d9
Move experiments away from the lib to the binary,
Tuomo Valkonen <tuomov@iki.fi>
parents:
72
diff
changeset
|
16 | //use pointsource_algs::fb::InsertionConfig; |
| 35 | 17 | use alg_tools::euclidean::Euclidean; |
| 18 | use alg_tools::instance::Instance; | |
| 19 | use alg_tools::mapping::Mapping; | |
| 20 | use alg_tools::operator_arithmetic::{MappingSum, Weighted}; | |
|
88
51dbb2cc25d9
Move experiments away from the lib to the binary,
Tuomo Valkonen <tuomov@iki.fi>
parents:
72
diff
changeset
|
21 | |
|
51dbb2cc25d9
Move experiments away from the lib to the binary,
Tuomo Valkonen <tuomov@iki.fi>
parents:
72
diff
changeset
|
22 | use pointsource_algs::kernels::SupportProductFirst as Prod; |
|
51dbb2cc25d9
Move experiments away from the lib to the binary,
Tuomo Valkonen <tuomov@iki.fi>
parents:
72
diff
changeset
|
23 | use pointsource_algs::kernels::*; |
|
51dbb2cc25d9
Move experiments away from the lib to the binary,
Tuomo Valkonen <tuomov@iki.fi>
parents:
72
diff
changeset
|
24 | use pointsource_algs::run::{DefaultAlgorithm, ExperimentBiased, ExperimentV2, Named, RunnableExperiment}; |
|
51dbb2cc25d9
Move experiments away from the lib to the binary,
Tuomo Valkonen <tuomov@iki.fi>
parents:
72
diff
changeset
|
25 | use pointsource_algs::types::*; |
|
51dbb2cc25d9
Move experiments away from the lib to the binary,
Tuomo Valkonen <tuomov@iki.fi>
parents:
72
diff
changeset
|
26 | use pointsource_algs::{AlgorithmOverrides, ExperimentSetup}; |
|
51dbb2cc25d9
Move experiments away from the lib to the binary,
Tuomo Valkonen <tuomov@iki.fi>
parents:
72
diff
changeset
|
27 | use pointsource_algs::rand_distr::{SaltAndPepper, SerializableNormal}; |
|
51dbb2cc25d9
Move experiments away from the lib to the binary,
Tuomo Valkonen <tuomov@iki.fi>
parents:
72
diff
changeset
|
28 | use pointsource_algs::regularisation::Regularisation; |
| 0 | 29 | |
| 30 | /// Experiments shorthands, to be used with the command line parser | |
| 31 | #[derive(ValueEnum, Debug, Copy, Clone, Eq, PartialEq, Hash, Serialize, Deserialize)] | |
| 32 | #[allow(non_camel_case_types)] | |
| 33 | pub enum DefaultExperiment { | |
| 34 | /// One dimension, cut gaussian spread, 2-norm-squared data fidelity | |
| 35 | #[clap(name = "1d")] | |
| 36 | Experiment1D, | |
| 37 | /// One dimension, “fast” spread, 2-norm-squared data fidelity | |
| 38 | #[clap(name = "1d_fast")] | |
| 39 | Experiment1DFast, | |
| 40 | /// Two dimensions, cut gaussian spread, 2-norm-squared data fidelity | |
| 41 | #[clap(name = "2d")] | |
| 42 | Experiment2D, | |
| 43 | /// Two dimensions, “fast” spread, 2-norm-squared data fidelity | |
| 44 | #[clap(name = "2d_fast")] | |
| 45 | Experiment2DFast, | |
| 46 | /// One dimension, cut gaussian spread, 1-norm data fidelity | |
| 47 | #[clap(name = "1d_l1")] | |
| 48 | Experiment1D_L1, | |
| 49 | /// One dimension, ‘“fast” spread, 1-norm data fidelity | |
| 50 | #[clap(name = "1d_l1_fast")] | |
| 51 | Experiment1D_L1_Fast, | |
| 52 | /// Two dimensions, cut gaussian spread, 1-norm data fidelity | |
| 53 | #[clap(name = "2d_l1")] | |
| 54 | Experiment2D_L1, | |
| 55 | /// Two dimensions, “fast” spread, 1-norm data fidelity | |
| 56 | #[clap(name = "2d_l1_fast")] | |
| 57 | Experiment2D_L1_Fast, | |
|
39
6316d68b58af
Merging adjustments, parameter tuning, etc.
Tuomo Valkonen <tuomov@iki.fi>
parents:
37
diff
changeset
|
58 | /// One dimension, “fast” spread, 2-norm-squared data fidelity with extra TV-regularised bias |
| 35 | 59 | #[clap(name = "1d_tv_fast")] |
| 60 | Experiment1D_TV_Fast, | |
|
39
6316d68b58af
Merging adjustments, parameter tuning, etc.
Tuomo Valkonen <tuomov@iki.fi>
parents:
37
diff
changeset
|
61 | /// Two dimensions, “fast” spread, 2-norm-squared data fidelity with extra TV-regularised bias |
|
6316d68b58af
Merging adjustments, parameter tuning, etc.
Tuomo Valkonen <tuomov@iki.fi>
parents:
37
diff
changeset
|
62 | #[clap(name = "2d_tv_fast")] |
|
6316d68b58af
Merging adjustments, parameter tuning, etc.
Tuomo Valkonen <tuomov@iki.fi>
parents:
37
diff
changeset
|
63 | Experiment2D_TV_Fast, |
| 0 | 64 | } |
| 65 | ||
|
61
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
66 | /// Command line experiment setup overrides |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
67 | #[skip_serializing_none] |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
68 | #[derive(Parser, Debug, Serialize, Deserialize, Default, Clone, Hash)] |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
69 | pub struct DefaultExperimentSetup<F: ClapFloat> { |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
70 | /// List of experiments to perform |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
71 | #[arg(value_name = "EXPERIMENT")] |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
72 | experiments: Vec<DefaultExperiment>, |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
73 | |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
74 | #[arg(long)] |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
75 | /// Regularisation parameter override. |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
76 | /// |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
77 | /// Only use if running just a single experiment, as different experiments have different |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
78 | /// regularisation parameters. |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
79 | alpha: Option<F>, |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
80 | |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
81 | #[arg(long)] |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
82 | /// Gaussian noise variance override |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
83 | variance: Option<F>, |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
84 | |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
85 | #[arg(long, value_names = &["MAGNITUDE", "PROBABILITY"])] |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
86 | /// Salt and pepper noise override. |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
87 | salt_and_pepper: Option<Vec<F>>, |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
88 | |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
89 | #[arg(long)] |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
90 | /// Noise seed |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
91 | noise_seed: Option<u64>, |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
92 | } |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
93 | |
| 0 | 94 | macro_rules! make_float_constant { |
| 95 | ($name:ident = $value:expr) => { | |
| 96 | #[derive(Debug, Copy, Eq, PartialEq, Clone, Serialize, Deserialize)] | |
| 97 | #[serde(into = "float")] | |
| 98 | struct $name; | |
|
61
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
99 | impl Into<f64> for $name { |
| 0 | 100 | #[inline] |
|
61
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
101 | fn into(self) -> float { |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
102 | $value |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
103 | } |
| 0 | 104 | } |
| 105 | impl Constant for $name { | |
| 106 | type Type = float; | |
|
61
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
107 | fn value(&self) -> float { |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
108 | $value |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
109 | } |
| 0 | 110 | } |
|
61
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
111 | }; |
| 0 | 112 | } |
| 113 | ||
| 114 | /// Ground-truth measure spike locations and magnitudes for 1D experiments | |
|
61
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
115 | static MU_TRUE_1D_BASIC: [(float, float); 4] = |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
116 | [(0.10, 10.0), (0.30, 2.0), (0.70, 3.0), (0.80, 5.0)]; |
| 0 | 117 | |
| 118 | /// Ground-truth measure spike locations and magnitudes for 2D experiments | |
|
61
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
119 | static MU_TRUE_2D_BASIC: [([float; 2], float); 4] = [ |
| 0 | 120 | ([0.15, 0.15], 10.0), |
| 121 | ([0.75, 0.45], 2.0), | |
| 122 | ([0.80, 0.50], 4.0), | |
|
61
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
123 | ([0.30, 0.70], 5.0), |
| 0 | 124 | ]; |
| 125 | ||
| 35 | 126 | /// The $\{0,1\}$-valued characteristic function of a ball as a [`Mapping`]. |
|
61
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
127 | #[derive(Debug, Copy, Clone, Serialize, PartialEq)] |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
128 | struct BallCharacteristic<F: Float, const N: usize> { |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
129 | pub center: Loc<N, F>, |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
130 | pub radius: F, |
| 35 | 131 | } |
| 132 | ||
|
61
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
133 | impl<F: Float, const N: usize> Mapping<Loc<N, F>> for BallCharacteristic<F, N> { |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
134 | type Codomain = F; |
| 35 | 135 | |
|
61
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
136 | fn apply<I: Instance<Loc<N, F>>>(&self, i: I) -> F { |
| 35 | 137 | if self.center.dist2(i) <= self.radius { |
| 138 | F::ONE | |
| 139 | } else { | |
| 140 | F::ZERO | |
| 141 | } | |
| 142 | } | |
| 143 | } | |
| 144 | ||
|
61
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
145 | /// Trait for customising the experiments available from the command line |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
146 | impl ExperimentSetup for DefaultExperimentSetup<f64> { |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
147 | type FloatType = f64; |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
148 | |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
149 | fn runnables(&self) -> DynResult<Vec<Box<dyn RunnableExperiment<Self::FloatType>>>> { |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
150 | self.experiments |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
151 | .iter() |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
152 | .unique() |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
153 | .map(|e| e.get_experiment(self)) |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
154 | .try_collect() |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
155 | } |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
156 | } |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
157 | |
| 0 | 158 | //#[replace_float_literals(F::cast_from(literal))] |
| 159 | impl DefaultExperiment { | |
| 160 | /// Convert the experiment shorthand into a runnable experiment configuration. | |
|
61
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
161 | fn get_experiment( |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
162 | &self, |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
163 | cli: &DefaultExperimentSetup<f64>, |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
164 | ) -> DynResult<Box<dyn RunnableExperiment<f64>>> { |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
165 | let name = "pointsource".to_string() + self.to_possible_value().unwrap().get_name(); |
| 0 | 166 | |
| 167 | let kernel_plot_width = 0.2; | |
| 168 | ||
|
61
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
169 | const BASE_SEED: u64 = 915373234; |
| 0 | 170 | |
|
61
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
171 | const N_SENSORS_1D: usize = 100; |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
172 | make_float_constant!(SensorWidth1D = 0.4 / (N_SENSORS_1D as float)); |
| 0 | 173 | |
|
61
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
174 | const N_SENSORS_2D: usize = 16; |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
175 | make_float_constant!(SensorWidth2D = 0.4 / (N_SENSORS_2D as float)); |
| 0 | 176 | |
|
61
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
177 | //const N_SENSORS_2D_MORE: usize = 32; |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
178 | //make_float_constant!(SensorWidth2DMore = 0.4 / (N_SENSORS_2D_MORE as float)); |
| 0 | 179 | |
| 180 | make_float_constant!(Variance1 = 0.05.powi(2)); | |
| 181 | make_float_constant!(CutOff1 = 0.15); | |
| 182 | make_float_constant!(Hat1 = 0.16); | |
| 35 | 183 | make_float_constant!(HatBias = 0.05); |
| 0 | 184 | |
|
72
e9a460a0e638
New simplified sliding a posteriori rule. Enable scaling heuristic from fixed `measure` crate. “Fast” spread Lipschitz factor fixes, etc.
Tuomo Valkonen <tuomov@iki.fi>
parents:
61
diff
changeset
|
185 | let basic = |alg| { |
|
61
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
186 | (alg, AlgorithmOverrides { |
|
72
e9a460a0e638
New simplified sliding a posteriori rule. Enable scaling heuristic from fixed `measure` crate. “Fast” spread Lipschitz factor fixes, etc.
Tuomo Valkonen <tuomov@iki.fi>
parents:
61
diff
changeset
|
187 | gradv_lipest_mult: Some(0.04), |
|
e9a460a0e638
New simplified sliding a posteriori rule. Enable scaling heuristic from fixed `measure` crate. “Fast” spread Lipschitz factor fixes, etc.
Tuomo Valkonen <tuomov@iki.fi>
parents:
61
diff
changeset
|
188 | transport_tolerance: Some(100.0), |
|
e9a460a0e638
New simplified sliding a posteriori rule. Enable scaling heuristic from fixed `measure` crate. “Fast” spread Lipschitz factor fixes, etc.
Tuomo Valkonen <tuomov@iki.fi>
parents:
61
diff
changeset
|
189 | ..Default::default() |
|
e9a460a0e638
New simplified sliding a posteriori rule. Enable scaling heuristic from fixed `measure` crate. “Fast” spread Lipschitz factor fixes, etc.
Tuomo Valkonen <tuomov@iki.fi>
parents:
61
diff
changeset
|
190 | }) |
|
e9a460a0e638
New simplified sliding a posteriori rule. Enable scaling heuristic from fixed `measure` crate. “Fast” spread Lipschitz factor fixes, etc.
Tuomo Valkonen <tuomov@iki.fi>
parents:
61
diff
changeset
|
191 | }; |
|
e9a460a0e638
New simplified sliding a posteriori rule. Enable scaling heuristic from fixed `measure` crate. “Fast” spread Lipschitz factor fixes, etc.
Tuomo Valkonen <tuomov@iki.fi>
parents:
61
diff
changeset
|
192 | let radon = |alg| { |
|
e9a460a0e638
New simplified sliding a posteriori rule. Enable scaling heuristic from fixed `measure` crate. “Fast” spread Lipschitz factor fixes, etc.
Tuomo Valkonen <tuomov@iki.fi>
parents:
61
diff
changeset
|
193 | (alg, AlgorithmOverrides { |
|
e9a460a0e638
New simplified sliding a posteriori rule. Enable scaling heuristic from fixed `measure` crate. “Fast” spread Lipschitz factor fixes, etc.
Tuomo Valkonen <tuomov@iki.fi>
parents:
61
diff
changeset
|
194 | gradv_lipest_mult: Some(0.04), |
|
e9a460a0e638
New simplified sliding a posteriori rule. Enable scaling heuristic from fixed `measure` crate. “Fast” spread Lipschitz factor fixes, etc.
Tuomo Valkonen <tuomov@iki.fi>
parents:
61
diff
changeset
|
195 | transport_tolerance: Some(1000.0), |
|
61
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
196 | ..Default::default() |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
197 | }) |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
198 | }; |
|
72
e9a460a0e638
New simplified sliding a posteriori rule. Enable scaling heuristic from fixed `measure` crate. “Fast” spread Lipschitz factor fixes, etc.
Tuomo Valkonen <tuomov@iki.fi>
parents:
61
diff
changeset
|
199 | let radon_2dtv = |alg| { |
|
61
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
200 | (alg, AlgorithmOverrides { |
|
72
e9a460a0e638
New simplified sliding a posteriori rule. Enable scaling heuristic from fixed `measure` crate. “Fast” spread Lipschitz factor fixes, etc.
Tuomo Valkonen <tuomov@iki.fi>
parents:
61
diff
changeset
|
201 | gradv_lipest_mult: Some(0.04), |
|
e9a460a0e638
New simplified sliding a posteriori rule. Enable scaling heuristic from fixed `measure` crate. “Fast” spread Lipschitz factor fixes, etc.
Tuomo Valkonen <tuomov@iki.fi>
parents:
61
diff
changeset
|
202 | transport_tolerance: Some(10000.0), |
|
e9a460a0e638
New simplified sliding a posteriori rule. Enable scaling heuristic from fixed `measure` crate. “Fast” spread Lipschitz factor fixes, etc.
Tuomo Valkonen <tuomov@iki.fi>
parents:
61
diff
changeset
|
203 | sigma0: Some(0.15), |
|
61
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
204 | ..Default::default() |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
205 | }) |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
206 | }; |
|
72
e9a460a0e638
New simplified sliding a posteriori rule. Enable scaling heuristic from fixed `measure` crate. “Fast” spread Lipschitz factor fixes, etc.
Tuomo Valkonen <tuomov@iki.fi>
parents:
61
diff
changeset
|
207 | macro_rules! overrides { |
|
e9a460a0e638
New simplified sliding a posteriori rule. Enable scaling heuristic from fixed `measure` crate. “Fast” spread Lipschitz factor fixes, etc.
Tuomo Valkonen <tuomov@iki.fi>
parents:
61
diff
changeset
|
208 | ($a:ident, $b:ident) => { |
|
e9a460a0e638
New simplified sliding a posteriori rule. Enable scaling heuristic from fixed `measure` crate. “Fast” spread Lipschitz factor fixes, etc.
Tuomo Valkonen <tuomov@iki.fi>
parents:
61
diff
changeset
|
209 | HashMap::from([ |
|
e9a460a0e638
New simplified sliding a posteriori rule. Enable scaling heuristic from fixed `measure` crate. “Fast” spread Lipschitz factor fixes, etc.
Tuomo Valkonen <tuomov@iki.fi>
parents:
61
diff
changeset
|
210 | $a(DefaultAlgorithm::SlidingFB), |
|
e9a460a0e638
New simplified sliding a posteriori rule. Enable scaling heuristic from fixed `measure` crate. “Fast” spread Lipschitz factor fixes, etc.
Tuomo Valkonen <tuomov@iki.fi>
parents:
61
diff
changeset
|
211 | $a(DefaultAlgorithm::SlidingPDPS), |
|
e9a460a0e638
New simplified sliding a posteriori rule. Enable scaling heuristic from fixed `measure` crate. “Fast” spread Lipschitz factor fixes, etc.
Tuomo Valkonen <tuomov@iki.fi>
parents:
61
diff
changeset
|
212 | $a(DefaultAlgorithm::ForwardPDPS), |
|
e9a460a0e638
New simplified sliding a posteriori rule. Enable scaling heuristic from fixed `measure` crate. “Fast” spread Lipschitz factor fixes, etc.
Tuomo Valkonen <tuomov@iki.fi>
parents:
61
diff
changeset
|
213 | $b(DefaultAlgorithm::RadonFB), |
|
e9a460a0e638
New simplified sliding a posteriori rule. Enable scaling heuristic from fixed `measure` crate. “Fast” spread Lipschitz factor fixes, etc.
Tuomo Valkonen <tuomov@iki.fi>
parents:
61
diff
changeset
|
214 | $b(DefaultAlgorithm::RadonSlidingFB), |
|
e9a460a0e638
New simplified sliding a posteriori rule. Enable scaling heuristic from fixed `measure` crate. “Fast” spread Lipschitz factor fixes, etc.
Tuomo Valkonen <tuomov@iki.fi>
parents:
61
diff
changeset
|
215 | $b(DefaultAlgorithm::RadonSlidingPDPS), |
|
e9a460a0e638
New simplified sliding a posteriori rule. Enable scaling heuristic from fixed `measure` crate. “Fast” spread Lipschitz factor fixes, etc.
Tuomo Valkonen <tuomov@iki.fi>
parents:
61
diff
changeset
|
216 | ]) |
|
e9a460a0e638
New simplified sliding a posteriori rule. Enable scaling heuristic from fixed `measure` crate. “Fast” spread Lipschitz factor fixes, etc.
Tuomo Valkonen <tuomov@iki.fi>
parents:
61
diff
changeset
|
217 | }; |
|
e9a460a0e638
New simplified sliding a posteriori rule. Enable scaling heuristic from fixed `measure` crate. “Fast” spread Lipschitz factor fixes, etc.
Tuomo Valkonen <tuomov@iki.fi>
parents:
61
diff
changeset
|
218 | } |
|
e9a460a0e638
New simplified sliding a posteriori rule. Enable scaling heuristic from fixed `measure` crate. “Fast” spread Lipschitz factor fixes, etc.
Tuomo Valkonen <tuomov@iki.fi>
parents:
61
diff
changeset
|
219 | |
| 0 | 220 | // We add a hash of the experiment name to the configured |
| 221 | // noise seed to not use the same noise for different experiments. | |
| 222 | let mut h = DefaultHasher::new(); | |
| 223 | name.hash(&mut h); | |
| 224 | let noise_seed = cli.noise_seed.unwrap_or(BASE_SEED) + h.finish(); | |
| 225 | ||
|
39
6316d68b58af
Merging adjustments, parameter tuning, etc.
Tuomo Valkonen <tuomov@iki.fi>
parents:
37
diff
changeset
|
226 | let default_merge_radius = 0.01; |
|
6316d68b58af
Merging adjustments, parameter tuning, etc.
Tuomo Valkonen <tuomov@iki.fi>
parents:
37
diff
changeset
|
227 | |
| 0 | 228 | use DefaultExperiment::*; |
| 229 | Ok(match self { | |
| 230 | Experiment1D => { | |
|
61
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
231 | let base_spread = Gaussian { variance: Variance1 }; |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
232 | let spread_cutoff = BallIndicator { r: CutOff1, exponent: Linfinity }; |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
233 | Box::new(Named { |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
234 | name, |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
235 | data: ExperimentV2 { |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
236 | domain: [[0.0, 1.0]].into(), |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
237 | sensor_count: [N_SENSORS_1D], |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
238 | regularisation: Regularisation::NonnegRadon(cli.alpha.unwrap_or(0.08)), |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
239 | noise_distr: SerializableNormal::new(0.0, cli.variance.unwrap_or(0.2))?, |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
240 | dataterm: DataTermType::L222, |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
241 | μ_hat: MU_TRUE_1D_BASIC.into(), |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
242 | sensor: BallIndicator { r: SensorWidth1D, exponent: Linfinity }, |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
243 | spread: Prod(spread_cutoff, base_spread), |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
244 | kernel: Prod(AutoConvolution(spread_cutoff), base_spread), |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
245 | kernel_plot_width, |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
246 | noise_seed, |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
247 | default_merge_radius, |
|
72
e9a460a0e638
New simplified sliding a posteriori rule. Enable scaling heuristic from fixed `measure` crate. “Fast” spread Lipschitz factor fixes, etc.
Tuomo Valkonen <tuomov@iki.fi>
parents:
61
diff
changeset
|
248 | algorithm_overrides: overrides!(basic, radon), |
|
61
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
249 | }, |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
250 | }) |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
251 | } |
| 0 | 252 | Experiment1DFast => { |
|
61
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
253 | let base_spread = HatConv { radius: Hat1 }; |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
254 | Box::new(Named { |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
255 | name, |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
256 | data: ExperimentV2 { |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
257 | domain: [[0.0, 1.0]].into(), |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
258 | sensor_count: [N_SENSORS_1D], |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
259 | regularisation: Regularisation::NonnegRadon(cli.alpha.unwrap_or(0.06)), |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
260 | noise_distr: SerializableNormal::new(0.0, cli.variance.unwrap_or(0.2))?, |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
261 | dataterm: DataTermType::L222, |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
262 | μ_hat: MU_TRUE_1D_BASIC.into(), |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
263 | sensor: BallIndicator { r: SensorWidth1D, exponent: Linfinity }, |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
264 | spread: base_spread, |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
265 | kernel: base_spread, |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
266 | kernel_plot_width, |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
267 | noise_seed, |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
268 | default_merge_radius, |
|
72
e9a460a0e638
New simplified sliding a posteriori rule. Enable scaling heuristic from fixed `measure` crate. “Fast” spread Lipschitz factor fixes, etc.
Tuomo Valkonen <tuomov@iki.fi>
parents:
61
diff
changeset
|
269 | algorithm_overrides: overrides!(basic, radon), |
|
61
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
270 | }, |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
271 | }) |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
272 | } |
| 0 | 273 | Experiment2D => { |
|
61
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
274 | let base_spread = Gaussian { variance: Variance1 }; |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
275 | let spread_cutoff = BallIndicator { r: CutOff1, exponent: Linfinity }; |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
276 | Box::new(Named { |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
277 | name, |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
278 | data: ExperimentV2 { |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
279 | domain: [[0.0, 1.0]; 2].into(), |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
280 | sensor_count: [N_SENSORS_2D; 2], |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
281 | regularisation: Regularisation::NonnegRadon(cli.alpha.unwrap_or(0.19)), |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
282 | noise_distr: SerializableNormal::new(0.0, cli.variance.unwrap_or(0.25))?, |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
283 | dataterm: DataTermType::L222, |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
284 | μ_hat: MU_TRUE_2D_BASIC.into(), |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
285 | sensor: BallIndicator { r: SensorWidth2D, exponent: Linfinity }, |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
286 | spread: Prod(spread_cutoff, base_spread), |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
287 | kernel: Prod(AutoConvolution(spread_cutoff), base_spread), |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
288 | kernel_plot_width, |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
289 | noise_seed, |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
290 | default_merge_radius, |
|
72
e9a460a0e638
New simplified sliding a posteriori rule. Enable scaling heuristic from fixed `measure` crate. “Fast” spread Lipschitz factor fixes, etc.
Tuomo Valkonen <tuomov@iki.fi>
parents:
61
diff
changeset
|
291 | algorithm_overrides: overrides!(basic, radon), |
|
61
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
292 | }, |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
293 | }) |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
294 | } |
| 0 | 295 | Experiment2DFast => { |
|
61
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
296 | let base_spread = HatConv { radius: Hat1 }; |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
297 | Box::new(Named { |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
298 | name, |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
299 | data: ExperimentV2 { |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
300 | domain: [[0.0, 1.0]; 2].into(), |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
301 | sensor_count: [N_SENSORS_2D; 2], |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
302 | regularisation: Regularisation::NonnegRadon(cli.alpha.unwrap_or(0.12)), |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
303 | noise_distr: SerializableNormal::new(0.0, cli.variance.unwrap_or(0.15))?, //0.25 |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
304 | dataterm: DataTermType::L222, |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
305 | μ_hat: MU_TRUE_2D_BASIC.into(), |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
306 | sensor: BallIndicator { r: SensorWidth2D, exponent: Linfinity }, |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
307 | spread: base_spread, |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
308 | kernel: base_spread, |
| 35 | 309 | kernel_plot_width, |
| 310 | noise_seed, | |
|
39
6316d68b58af
Merging adjustments, parameter tuning, etc.
Tuomo Valkonen <tuomov@iki.fi>
parents:
37
diff
changeset
|
311 | default_merge_radius, |
|
72
e9a460a0e638
New simplified sliding a posteriori rule. Enable scaling heuristic from fixed `measure` crate. “Fast” spread Lipschitz factor fixes, etc.
Tuomo Valkonen <tuomov@iki.fi>
parents:
61
diff
changeset
|
312 | algorithm_overrides: overrides!(basic, radon), |
|
39
6316d68b58af
Merging adjustments, parameter tuning, etc.
Tuomo Valkonen <tuomov@iki.fi>
parents:
37
diff
changeset
|
313 | }, |
|
61
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
314 | }) |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
315 | } |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
316 | Experiment1D_L1 => { |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
317 | let base_spread = Gaussian { variance: Variance1 }; |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
318 | let spread_cutoff = BallIndicator { r: CutOff1, exponent: Linfinity }; |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
319 | Box::new(Named { |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
320 | name, |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
321 | data: ExperimentV2 { |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
322 | domain: [[0.0, 1.0]].into(), |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
323 | sensor_count: [N_SENSORS_1D], |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
324 | regularisation: Regularisation::NonnegRadon(cli.alpha.unwrap_or(0.1)), |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
325 | noise_distr: SaltAndPepper::new( |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
326 | cli.salt_and_pepper.as_ref().map_or(0.6, |v| v[0]), |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
327 | cli.salt_and_pepper.as_ref().map_or(0.4, |v| v[1]), |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
328 | )?, |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
329 | dataterm: DataTermType::L1, |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
330 | μ_hat: MU_TRUE_1D_BASIC.into(), |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
331 | sensor: BallIndicator { r: SensorWidth1D, exponent: Linfinity }, |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
332 | spread: Prod(spread_cutoff, base_spread), |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
333 | kernel: Prod(AutoConvolution(spread_cutoff), base_spread), |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
334 | kernel_plot_width, |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
335 | noise_seed, |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
336 | default_merge_radius, |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
337 | algorithm_overrides: HashMap::new(), |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
338 | }, |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
339 | }) |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
340 | } |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
341 | Experiment1D_L1_Fast => { |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
342 | let base_spread = HatConv { radius: Hat1 }; |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
343 | Box::new(Named { |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
344 | name, |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
345 | data: ExperimentV2 { |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
346 | domain: [[0.0, 1.0]].into(), |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
347 | sensor_count: [N_SENSORS_1D], |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
348 | regularisation: Regularisation::NonnegRadon(cli.alpha.unwrap_or(0.12)), |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
349 | noise_distr: SaltAndPepper::new( |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
350 | cli.salt_and_pepper.as_ref().map_or(0.6, |v| v[0]), |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
351 | cli.salt_and_pepper.as_ref().map_or(0.4, |v| v[1]), |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
352 | )?, |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
353 | dataterm: DataTermType::L1, |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
354 | μ_hat: MU_TRUE_1D_BASIC.into(), |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
355 | sensor: BallIndicator { r: SensorWidth1D, exponent: Linfinity }, |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
356 | spread: base_spread, |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
357 | kernel: base_spread, |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
358 | kernel_plot_width, |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
359 | noise_seed, |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
360 | default_merge_radius, |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
361 | algorithm_overrides: HashMap::new(), |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
362 | }, |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
363 | }) |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
364 | } |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
365 | Experiment2D_L1 => { |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
366 | let base_spread = Gaussian { variance: Variance1 }; |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
367 | let spread_cutoff = BallIndicator { r: CutOff1, exponent: Linfinity }; |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
368 | Box::new(Named { |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
369 | name, |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
370 | data: ExperimentV2 { |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
371 | domain: [[0.0, 1.0]; 2].into(), |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
372 | sensor_count: [N_SENSORS_2D; 2], |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
373 | regularisation: Regularisation::NonnegRadon(cli.alpha.unwrap_or(0.35)), |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
374 | noise_distr: SaltAndPepper::new( |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
375 | cli.salt_and_pepper.as_ref().map_or(0.8, |v| v[0]), |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
376 | cli.salt_and_pepper.as_ref().map_or(0.2, |v| v[1]), |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
377 | )?, |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
378 | dataterm: DataTermType::L1, |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
379 | μ_hat: MU_TRUE_2D_BASIC.into(), |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
380 | sensor: BallIndicator { r: SensorWidth2D, exponent: Linfinity }, |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
381 | spread: Prod(spread_cutoff, base_spread), |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
382 | kernel: Prod(AutoConvolution(spread_cutoff), base_spread), |
|
39
6316d68b58af
Merging adjustments, parameter tuning, etc.
Tuomo Valkonen <tuomov@iki.fi>
parents:
37
diff
changeset
|
383 | kernel_plot_width, |
|
6316d68b58af
Merging adjustments, parameter tuning, etc.
Tuomo Valkonen <tuomov@iki.fi>
parents:
37
diff
changeset
|
384 | noise_seed, |
|
6316d68b58af
Merging adjustments, parameter tuning, etc.
Tuomo Valkonen <tuomov@iki.fi>
parents:
37
diff
changeset
|
385 | default_merge_radius, |
|
61
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
386 | algorithm_overrides: HashMap::from([]), |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
387 | }, |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
388 | }) |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
389 | } |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
390 | Experiment2D_L1_Fast => { |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
391 | let base_spread = HatConv { radius: Hat1 }; |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
392 | Box::new(Named { |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
393 | name, |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
394 | data: ExperimentV2 { |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
395 | domain: [[0.0, 1.0]; 2].into(), |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
396 | sensor_count: [N_SENSORS_2D; 2], |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
397 | regularisation: Regularisation::NonnegRadon(cli.alpha.unwrap_or(0.40)), |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
398 | noise_distr: SaltAndPepper::new( |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
399 | cli.salt_and_pepper.as_ref().map_or(0.8, |v| v[0]), |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
400 | cli.salt_and_pepper.as_ref().map_or(0.2, |v| v[1]), |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
401 | )?, |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
402 | dataterm: DataTermType::L1, |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
403 | μ_hat: MU_TRUE_2D_BASIC.into(), |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
404 | sensor: BallIndicator { r: SensorWidth2D, exponent: Linfinity }, |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
405 | spread: base_spread, |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
406 | kernel: base_spread, |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
407 | kernel_plot_width, |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
408 | noise_seed, |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
409 | default_merge_radius, |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
410 | algorithm_overrides: HashMap::from([]), |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
411 | }, |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
412 | }) |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
413 | } |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
414 | Experiment1D_TV_Fast => { |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
415 | let base_spread = HatConv { radius: HatBias }; |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
416 | Box::new(Named { |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
417 | name, |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
418 | data: ExperimentBiased { |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
419 | λ: 0.02, |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
420 | bias: MappingSum::new([ |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
421 | Weighted::new(1.0, BallCharacteristic { |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
422 | center: 0.3.into(), |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
423 | radius: 0.2, |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
424 | }), |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
425 | Weighted::new(0.5, BallCharacteristic { |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
426 | center: 0.6.into(), |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
427 | radius: 0.3, |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
428 | }), |
|
39
6316d68b58af
Merging adjustments, parameter tuning, etc.
Tuomo Valkonen <tuomov@iki.fi>
parents:
37
diff
changeset
|
429 | ]), |
|
61
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
430 | base: ExperimentV2 { |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
431 | domain: [[0.0, 1.0]].into(), |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
432 | sensor_count: [N_SENSORS_1D], |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
433 | regularisation: Regularisation::NonnegRadon(cli.alpha.unwrap_or(0.2)), |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
434 | noise_distr: SerializableNormal::new(0.0, cli.variance.unwrap_or(0.1))?, |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
435 | dataterm: DataTermType::L222, |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
436 | μ_hat: MU_TRUE_1D_BASIC.into(), |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
437 | sensor: BallIndicator { r: SensorWidth1D, exponent: Linfinity }, |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
438 | spread: base_spread, |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
439 | kernel: base_spread, |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
440 | kernel_plot_width, |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
441 | noise_seed, |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
442 | default_merge_radius, |
|
72
e9a460a0e638
New simplified sliding a posteriori rule. Enable scaling heuristic from fixed `measure` crate. “Fast” spread Lipschitz factor fixes, etc.
Tuomo Valkonen <tuomov@iki.fi>
parents:
61
diff
changeset
|
443 | algorithm_overrides: overrides!(basic, radon), |
|
61
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
444 | }, |
| 35 | 445 | }, |
|
61
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
446 | }) |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
447 | } |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
448 | Experiment2D_TV_Fast => { |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
449 | let base_spread = HatConv { radius: Hat1 }; |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
450 | Box::new(Named { |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
451 | name, |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
452 | data: ExperimentBiased { |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
453 | λ: 0.005, |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
454 | bias: MappingSum::new([ |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
455 | Weighted::new(1.0, BallCharacteristic { |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
456 | center: [0.3, 0.3].into(), |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
457 | radius: 0.2, |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
458 | }), |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
459 | Weighted::new(0.5, BallCharacteristic { |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
460 | center: [0.6, 0.6].into(), |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
461 | radius: 0.3, |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
462 | }), |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
463 | ]), |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
464 | base: ExperimentV2 { |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
465 | domain: [[0.0, 1.0]; 2].into(), |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
466 | sensor_count: [N_SENSORS_2D; 2], |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
467 | regularisation: Regularisation::NonnegRadon(cli.alpha.unwrap_or(0.06)), |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
468 | noise_distr: SerializableNormal::new( |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
469 | 0.0, |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
470 | cli.variance.unwrap_or(0.15), |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
471 | )?, //0.25 |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
472 | dataterm: DataTermType::L222, |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
473 | μ_hat: MU_TRUE_2D_BASIC.into(), |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
474 | sensor: BallIndicator { r: SensorWidth2D, exponent: Linfinity }, |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
475 | spread: base_spread, |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
476 | kernel: base_spread, |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
477 | kernel_plot_width, |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
478 | noise_seed, |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
479 | default_merge_radius, |
|
72
e9a460a0e638
New simplified sliding a posteriori rule. Enable scaling heuristic from fixed `measure` crate. “Fast” spread Lipschitz factor fixes, etc.
Tuomo Valkonen <tuomov@iki.fi>
parents:
61
diff
changeset
|
480 | algorithm_overrides: overrides!(basic, radon_2dtv), |
|
61
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
481 | }, |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
482 | }, |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
483 | }) |
|
4f468d35fa29
General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents:
45
diff
changeset
|
484 | } |
| 0 | 485 | }) |
| 486 | } | |
| 487 | } |