Skip to content
This repository has been archived by the owner on Oct 16, 2024. It is now read-only.

Commit

Permalink
debug tests and lgs
Browse files Browse the repository at this point in the history
  • Loading branch information
a-sevin committed Dec 15, 2023
1 parent dd4cca2 commit 114687d
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 20 deletions.
26 changes: 13 additions & 13 deletions data/par/par4bench/scao_10x10_16pix.py
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
import shesha as ao
import shesha.config as conf

simul_name = "bench_scao_10x10_16pix"

#loop
p_loop = ao.ParamLoop()
p_loop = conf.ParamLoop()

p_loop.set_niter(1000)
p_loop.set_ittime(0.002) #=1/500

#geom
p_geom = ao.ParamGeom()
p_geom = conf.ParamGeom()

p_geom.set_zenithangle(0.)

#tel
p_tel = ao.ParamTel()
p_tel = conf.ParamTel()

p_tel.set_diam(8.0)
p_tel.set_cobs(0.12)

#atmos
p_atmos = ao.ParamAtmos()
p_atmos = conf.ParamAtmos()

p_atmos.set_r0(0.16)
p_atmos.set_nscreens(1)
Expand All @@ -31,16 +31,16 @@
p_atmos.set_L0([1.e5])

#target
p_target = ao.ParamTarget()
p_target = conf.ParamTarget()
p_targets = [p_target]
p_target.set_xpos(0.)
p_target.set_ypos(0.)
p_target.set_Lambda(1.65)
p_target.set_mag(10.)

#wfs
p_wfs0 = ao.ParamWfs()
p_wfs1 = ao.ParamWfs()
p_wfs0 = conf.ParamWfs()
p_wfs1 = conf.ParamWfs()
p_wfss = [p_wfs0]

p_wfs0.set_type("sh")
Expand All @@ -67,8 +67,8 @@
#p_wfs0.set_beamsize(0.8)

#dm
p_dm0 = ao.ParamDm()
p_dm1 = ao.ParamDm()
p_dm0 = conf.ParamDm()
p_dm1 = conf.ParamDm()
p_dms = [p_dm0, p_dm1]
p_dm0.set_type("pzt")
nact = p_wfs0.nxsub + 1
Expand All @@ -85,7 +85,7 @@
p_dm1.set_push4imat(10.)

#centroiders
p_centroider0 = ao.ParamCentroider()
p_centroider0 = conf.ParamCentroider()
p_centroiders = [p_centroider0]

p_centroider0.set_nwfs(0)
Expand All @@ -94,7 +94,7 @@
#p_centroider0.set_type_fct("model")

#controllers
p_controller0 = ao.ParamController()
p_controller0 = conf.ParamController()
p_controllers = [p_controller0]

p_controller0.set_type("ls")
Expand All @@ -112,7 +112,7 @@
p_controller0.set_ngain(500)

#rtc
p_rtc = ao.Param_rtc()
p_rtc = conf.Param_rtc()

p_rtc.set_nwfs(1)
p_rtc.set_centroiders(p_centroiders)
Expand Down
12 changes: 8 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "shesha"
version = "5.5.0-0"
version = "5.5.0-3"
description = "SHESHA is the python part of the COMPASS platform designed to meet the need of high-performance for the simulation of AO systems"
authors = [
"Florian Ferreira <florian.ferreira@obspm.fr>",
Expand All @@ -16,10 +16,14 @@ readme = "README.md"
repository = "https://github.com/ANR-COMPASS/shesha"
documentation = "https://shesha.readthedocs.io/en/master/"
packages = [
{ include = "data" },
{ include = "shesha" },
{ include = "CHANGELOG.md" },
{ include = "report_E2E.md" },
{ include = "data" },
{ include = "tests" },
]

include = [
{ path = "CHANGELOG.md" },
{ path = "report_E2E.md" },
]

[tool.poetry.dependencies]
Expand Down
2 changes: 1 addition & 1 deletion shesha/init/lgs_init.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ def prep_lgs_prof(p_wfs: conf.ParamWfs, nsensors: int, p_tel: conf.ParamTel,

profilename = scons.ProfType.FILES[p_wfs.proftype]

profile_path = shesha_savepath + profilename
profile_path = f"{shesha_savepath}/{profilename}"
print("reading Na profile from", profile_path)
prof = np.load(profile_path)
make_lgs_prof1d(p_wfs, p_tel, np.mean(prof[1:, :], axis=0), prof[0, :],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@

precision = 1e-2

config = ParamConfig(os.path.dirname(__file__) + "/../par/test_pyrhr.py")
config = ParamConfig(os.path.dirname(__file__) + "/../../par/test_pyrhr.py")
sup = Supervisor(config)
sup.next()
sup.rtc.open_loop(0)
Expand Down
2 changes: 1 addition & 1 deletion tests/pytest/rtc_standalone/FP32/test_rtcstandalone_sh.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@

precision = 1e-2

config = ParamConfig(os.path.dirname(__file__) + "/../par/test_sh.py")
config = ParamConfig(os.path.dirname(__file__) + "/../../par/test_sh.py")
sup = Supervisor(config)
sup.next()
sup.rtc.open_loop(0)
Expand Down

0 comments on commit 114687d

Please sign in to comment.