Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
resolve
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ift
resolve
Commits
2ab97583
Commit
2ab97583
authored
2 weeks ago
by
Andreas Popp
Browse files
Options
Downloads
Patches
Plain Diff
Added further functionality to CalibrationAssembler
parent
21663d74
No related branches found
Branches containing commit
No related tags found
1 merge request
!55
Jax port of essential resolve to resolve.re
Pipeline
#261334
passed
2 weeks ago
Stage: build_docker
Stage: testing
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
resolve/re/sugar.py
+15
-1
15 additions, 1 deletion
resolve/re/sugar.py
with
15 additions
and
1 deletion
resolve/re/sugar.py
+
15
−
1
View file @
2ab97583
import
jax.numpy
as
jnp
import
nifty8.re
as
jft
import
matplotlib.pyplot
as
plt
from
.calibration
import
CalibrationDistribution
from
.likelihood_models
import
ModelCalibrationLikelihoodFixedCovariance
from
..data.observation
import
Observation
...
...
@@ -168,7 +170,19 @@ class CalibrationAssembler:
scaling_op
=
None
return
cls
(
observation
,
phase_field
,
logflux_field
,
dt
,
init_flux_field
,
scaling_op
,
log_inv_cov
,
lh_label
)
def
prior_realization
(
self
,
rng_key
):
data_model
=
ModelCalibrationLikelihoodFixedCovariance
(
self
.
scaled_cop
,
self
.
model_vis
,
jnp
.
asarray
(
self
.
obs
.
mask
.
val
))
data_model_realization
=
data_model
(
data_model
.
init
(
rng_key
))
plt
.
scatter
(
self
.
obs
.
vis
.
val
.
imag
,
self
.
obs
.
vis
.
val
.
real
,
label
=
"
Data
"
)
plt
.
scatter
(
data_model_realization
.
imag
,
data_model_realization
.
real
,
alpha
=
0.01
,
label
=
"
Prior sample
"
)
plt
.
legend
()
plt
.
show
()
def
get_lh_domain
(
self
):
dom
=
self
.
scaled_cop
.
domain
if
self
.
log_inv_cov
is
None
else
self
.
scaled_cop
.
domain
|
self
.
log_inv_cov
.
domain
return
dom
def
__repr__
(
self
):
return
(
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment