This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
modules: | |
- galsim_extra | |
- galsim.des | |
psf: | |
type: PSFEx | |
gal: | |
type: Gaussian | |
sigma: 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Euterpea | |
rythm = [1, 1, 1, 0, 1, 1, 0, 1, 0, 1, 1, 0] | |
r1 = concat $ take 13 (repeat rythm) | |
r2 = concat [drop i rythm ++ take i rythm | i <- [0..12]] | |
clap 1 = c 4 sn | |
clap 0 = rest sn |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
This module provides a wrapper for `nlsolve`, from `NLsolve.jl`, which is a package for solving | |
nonlinear systems of equations. | |
The wrapper extends `nlsolve` to allow the `residuals!` function to take additional fixed parameters | |
as a tuple of vectors. This convieniently handles | |
[julia's closure inneficiency problems](https://docs.julialang.org/en/v1/manual/performance-tips/#man-performance-captured), | |
but more importantly facilitates the fast differentiation (with `ForwardDiff`) of the minimizer with | |
respect to the parameters. | |
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from juliacall import Main as jl | |
import time | |
jl.include("utils.jl") | |
def wait_for_spectrum(s): | |
while True: | |
time.sleep(0.1) | |
if jl.isready(s): | |
print("Worker is ready!") | |
print(jl.fetch(s)) |