Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem generating a strong lensing observation with the current pip version (0.2.0) #52

Open
SalvadorNegrete opened this issue Nov 6, 2023 · 1 comment

Comments

@SalvadorNegrete
Copy link

Running the ConfigHandler routine for a test configuration (and consequently using the draw_image function) results in an image like the one I attached in the end (this occurs regardless of the values I use on the configuration archive, for this specific example, 'config_test.py' is the same as the configuration example found in 'paltas/Configs/Examples/config_simple.py'). I have a similar problem using the 'generate.py' alternative.

import paltas
import os
import matplotlib.pyplot as plt
from astropy.visualization import simple_norm

from paltas.Configs.config_handler import ConfigHandler
config_handler = ConfigHandler('config_test.py')
kwargs_model, kwargs_params = config_handler.get_lenstronomy_models_kwargs()
image, metadata = config_handler.draw_image()
image_norm = simple_norm(image, stretch='asinh')
plt.imshow(image, norm=image_norm)
plt.show()

Screenshot 2023-11-06 at 1 20 18 a m
@swagnercarena
Copy link
Owner

Hi! The pip version is a bit out of date. Updating it is a top priority, but in the mean time have you tried using the current main branch instead? I'm not immediately sure what could be causing this issue, but my first guess is that the pip version you have installed is calling the lenstronomy function EPL instead of EPL_NUMBA. EPL requires a separate installation of fastell4py whereas EPL_NUMBA does not. Try running the tests in the test folder and see if you get any failures.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants