def test_calibrate(): # Very bare-bones test for calibration runs # Just checking that no errors are thrown! kwargs = dict( generate=dict(nlc=5), sample=dict(run_nested_kwargs=dict(maxiter=10)), plot=dict(ninc_points=5, ninc_samples=2), ) calibrate.run(path=".test_calibrate", **kwargs)
from starry_process import calibrate import numpy as np import os import shutil # Utility funcs to move figures to this directory abspath = lambda *args: os.path.join( os.path.dirname(os.path.abspath(__file__)), *args) copy = lambda name, src, dest: shutil.copyfile(abspath("data", name, src), abspath(dest)) # Run calibrate.run( path=abspath("data/ld"), generate=dict(u=[0.5, 0.25]), sample=dict(u=[0.5, 0.25]), plot_data=False, plot_inclination_pdf=False, ) # Copy output to this directory copy("ld", "corner_transformed.pdf", "calibration_ld_corner.pdf") copy("ld", "latitude.pdf", "calibration_ld_latitude.pdf")
fig = old_corner(*args, **kwargs) ax = np.reshape(fig.axes, (5, 5)) for axis in ax[:, 0]: axis.axvspan(0, 10, hatch="//", facecolor="none", lw=0.5, alpha=0.25) return fig corner.corner = new_corner from starry_process import calibrate # Utility funcs to move figures to this directory abspath = lambda *args: os.path.join( os.path.dirname(os.path.abspath(__file__)), *args ) copy = lambda name, src, dest: shutil.copyfile( abspath("data", name, src), abspath(dest) ) # Run calibrate.run( path=abspath("data/tinyspots"), generate=dict(radius=dict(mu=3.0, sigma=0.25), contrast=dict(mu=1)), plot_data=False, plot_inclination_pdf=False, ) # Copy output to this directory copy("tinyspots", "corner_transformed.pdf", "calibration_tinyspots_corner.pdf") copy("tinyspots", "latitude.pdf", "calibration_tinyspots_latitude.pdf")
from starry_process import calibrate import numpy as np import os import shutil # Utility funcs to move figures to this directory abspath = lambda *args: os.path.join( os.path.dirname(os.path.abspath(__file__)), *args) copy = lambda name, src, dest: shutil.copyfile(abspath("data", name, src), abspath(dest)) # Run calibrate.run( path=abspath("data/hilat"), generate=dict(latitude=dict(mu=60)), plot_data=False, plot_inclination_pdf=False, ) # Copy output to this directory copy("hilat", "corner_transformed.pdf", "calibration_hilat_corner.pdf") copy("hilat", "latitude.pdf", "calibration_hilat_latitude.pdf")
from starry_process import calibrate import numpy as np import os import shutil # Utility funcs to move figures to this directory abspath = lambda *args: os.path.join( os.path.dirname(os.path.abspath(__file__)), *args) copy = lambda name, src, dest: shutil.copyfile(abspath("data", name, src), abspath(dest)) # Run calibrate.run( path=abspath("data/ld_500_no_ld"), generate=dict(nlc=500, u=[0.5, 0.25]), sample=dict(u=[0.0, 0.0], compute_inclination_pdf=False), plot_data=False, plot_inclination_pdf=False, ) # Copy output to this directory copy( "ld_500_no_ld", "corner_transformed.pdf", "calibration_ld_500_no_ld_corner.pdf", ) copy("ld_500_no_ld", "latitude.pdf", "calibration_ld_500_no_ld_latitude.pdf")
from starry_process import calibrate import numpy as np import os import shutil # Utility funcs to move figures to this directory abspath = lambda *args: os.path.join( os.path.dirname(os.path.abspath(__file__)), *args) copy = lambda name, src, dest: shutil.copyfile(abspath("data", name, src), abspath(dest)) # Run calibrate.run( path=abspath("data/default_1"), generate=dict(nlc=1), sample=dict(compute_inclination_pdf=False), plot_data=False, plot_inclination_pdf=False, ) # Copy output to this directory copy("default_1", "corner_transformed.pdf", "calibration_default_1_corner.pdf") copy("default_1", "latitude.pdf", "calibration_default_1_latitude.pdf")
from starry_process import calibrate import numpy as np import os import shutil # Utility funcs to move figures to this directory abspath = lambda *args: os.path.join( os.path.dirname(os.path.abspath(__file__)), *args ) copy = lambda name, src, dest: shutil.copyfile( abspath("data", name, src), abspath(dest) ) # Run calibrate.run( path=abspath("data/bigspots"), generate=dict(radius=dict(mu=45, sigma=5), nspots=dict(mu=1)), sample=dict(rmax=60), plot_data=False, plot_inclination_pdf=False, ) # Copy output to this directory copy("bigspots", "corner_transformed.pdf", "calibration_bigspots_corner.pdf") copy("bigspots", "latitude.pdf", "calibration_bigspots_latitude.pdf")
from starry_process import calibrate import numpy as np import os import shutil # Utility funcs to move figures to this directory abspath = lambda *args: os.path.join( os.path.dirname(os.path.abspath(__file__)), *args) copy = lambda name, src, dest: shutil.copyfile(abspath("data", name, src), abspath(dest)) # Run calibrate.run( path=abspath("data/hicontrast"), generate=dict(nspots=dict(mu=2), contrast=dict(mu=0.5)), sample=dict(compute_inclination_pdf=False), ) # Copy output to this directory copy("hicontrast", "corner_transformed.pdf", "calibration_hicontrast_corner.pdf") copy("hicontrast", "latitude.pdf", "calibration_hicontrast_latitude.pdf")
from starry_process import calibrate import numpy as np import os import shutil # Utility funcs to move figures to this directory abspath = lambda *args: os.path.join( os.path.dirname(os.path.abspath(__file__)), *args) copy = lambda name, src, dest: shutil.copyfile(abspath("data", name, src), abspath(dest)) # Run calibrate.run( path=abspath("data/variance"), generate=dict( nlc=1000, nspots=dict(sigma=3), radius=dict(sigma=3), contrast=dict(sigma=0.01), ), sample=dict(compute_inclination_pdf=False), plot_data=False, plot_inclination_pdf=False, ) # Copy output to this directory copy("variance", "corner_transformed.pdf", "calibration_variance_corner.pdf") copy("variance", "latitude.pdf", "calibration_variance_latitude.pdf")
from starry_process import calibrate import numpy as np import os import shutil # Utility funcs to move figures to this directory abspath = lambda *args: os.path.join( os.path.dirname(os.path.abspath(__file__)), *args) copy = lambda name, src, dest: shutil.copyfile(abspath("data", name, src), abspath(dest)) # Run calibrate.run( path=abspath("data/isotropic"), generate=dict(latitude=dict(sigma=np.inf)), plot_data=False, plot_inclination_pdf=False, ) # Copy output to this directory copy("isotropic", "corner_transformed.pdf", "calibration_isotropic_corner.pdf") copy("isotropic", "latitude.pdf", "calibration_isotropic_latitude.pdf")
from starry_process import calibrate import numpy as np import os import shutil # Utility funcs to move figures to this directory abspath = lambda *args: os.path.join( os.path.dirname(os.path.abspath(__file__)), *args) copy = lambda name, src, dest: shutil.copyfile(abspath("data", name, src), abspath(dest)) # Run calibrate.run(path=abspath("data/default"), ncols=7, clip=True) # Copy output to this directory copy("default", "data.pdf", "calibration_default_data.pdf") copy("default", "corner_transformed.pdf", "calibration_default_corner.pdf") copy("default", "latitude.pdf", "calibration_default_latitude.pdf") copy("default", "inclination.pdf", "calibration_default_inclination.pdf")
from starry_process import calibrate import numpy as np import os import shutil # Utility funcs to move figures to this directory abspath = lambda *args: os.path.join( os.path.dirname(os.path.abspath(__file__)), *args) copy = lambda name, src, dest: shutil.copyfile(abspath("data", name, src), abspath(dest)) # Run calibrate.run( path=abspath("data/unnorm"), generate=dict(normalized=False), plot_data=False, plot_inclination_pdf=False, ) # Copy output to this directory copy("unnorm", "corner_transformed.pdf", "calibration_unnorm_corner.pdf") copy("unnorm", "latitude.pdf", "calibration_unnorm_latitude.pdf")