-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathTODO
124 lines (59 loc) · 2.26 KB
/
TODO
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
1. Finish up Gaussian/Elliptical sources...
2. SourceCatalog
3. ScalarMap...
4. Get CRUSH working again with new image classes...
Overall...
- AbstractMatrix / ArrayUtil parse with position.
- Gaussian/Elliptical source:
--> call adapt() before getting shape parameters...
- Revised returntypes for subclasses (to avoid unnecessary casts...)
e.g. copy() / clone()
- copy() not to copy Strings (they are inmutable!), or other inmutable objects
- hashCode() / equals for new classes!
- weight / exposure units...
- avoid duplicate header edits between Instrument / MapProperties...
- store scaled with Unit or not...
- synchronized...
- Image2D.getImage() to return itself (fast) or copy (consistent)?
- redor FFT to use Parallel (instead of proprietary task / queue...)
* GridSource, AstroImage, AstroMap -> SourceMap / SourceModelProperties
* SourceModel to have SourceModelProperties
* SourceMap.Properties to include SourceModelProperties
Data2D -> points
* T getValueAt(i,j) / setValue(i, j, T)
* Each element to be Object for safe concurrent access
(synchronized updates!) -- 5x overhead for float arrays, 3x
for double...
* Map2D is a stack of separate planes (value, weight, exposure)
* Weighted sums with external weight W
sum { W w x } / sum { W w }
w and x may be vectors or complex objects...
A. If x and w are of type <T>, then want wx to be also type <T>
and the sums to be <T> and their ratios to be <T>,
so T must implement:
Copiable
*W --> Scalable
sum{} --> Additive<T>
wx --> Multiplicative<T>
sum{}/sum{} --> Division<T>, Ration<T,T>
B. Z contains T w, and T x
T.copy([withContent])
(T: CopiableContent/Copiable)
Z.accumulate(Z, double W) --> x += W * Z.w * Z.x
w += W * Z.w
(T: Product, Scalable, Additive)
? Multiplicative, LinearAlgebra
Z.accumulate(Z, double W, double G) -->
x += W * G * Z.w * Z.x
w += W * Z.w * G^2
Z.endAccumulation() --> x /= w
(T: Ratio)
T.scale(double)
T.add(double)
RealMath extends Scalable, RealOffset
add(double)
subtract(double)
scale(double)
-> interface Z
WeightedPoint implements Z
* (optional) Can read/write as multidim primitive arrays (Fot FITS)...