question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Issue with PS rendering (with 0.9.2)

See original GitHub issue

I’m having trouble with version 0.9.2 : when I try the following kwargs

kwargs_model = {..., 'point_source_model_list': ['LENSED_POSITION'], 'fixed_magnification_list': [False]} 

#kwargs_params = {..., 'point_source_model': [[{'ra_image': array([-0.9,  0.6,  0.9, -0.7]), 'dec_image': array([-0.9, -0.9,  0.7,  0.9])}], [{'ra_image': array([0.1, 0.1, 0.1, 0.1]), 'dec_image': array([0.1, 0.1, 0.1, 0.1])}], [{}], [{'ra_image': array([-10., -10., -10., -10.]), 'dec_image': array([-10., -10., -10., -10.])}], [{'ra_image': array([10., 10., 10., 10.]), 'dec_image': array([10., 10., 10., 10.])}]]', ...}

kwargs_results = {..., 'kwargs_ps': [{'point_amp': array([266.79773197, 280.07506424, 273.46808759, 265.219639  ]), 'ra_image': array([-0.9204886 ,  0.64522794,  0.85173559, -0.70591383]), 'dec_image': array([-0.83137116, -0.78471491,  0.76415318,  0.82666677])}], 'kwargs_special': {'delta_x_image': array([-0.0010609 ,  0.00510851, -0.00247576,  0.00350916]), 'delta_y_image': array([ 0.00097327, -0.00090853,  0.00016772, -0.00074446]), 'D_dt': 5361.082157276348}, ...}

I obtain the following error in ImSim/Numerics/point_source_rendering :

lenstronomy/ImSim/Numerics/point_source_rendering.py", line 35, in _displace_astrometry delta_x_new[0:len(delta_x)] = delta_x ValueError: could not broadcast input array from shape (4) into shape (1)

I went back to previously called methods, and I found that the method PointSource.linear_response_set() returns the ra_pos variable as

ra_pos = [[-0.9204885979919323], [0.6452279400704862], [0.8517355905217909], [-0.7059138349159952]]

i.e. separating each individual point source from the same model in lists containing one coordinate. Is it the expected behaviour ? By looking to the point_source_rendering() and _displace_astrometry() methods, it seems not…

What is strange though is that with version 0.9.0 I didn’t have this issue (with the exact same input kwargs), despite having not spotted any obvious changes between 0.9.0 and 0.9.2 (except this new _displace_astrometry() method, but I suspect the error is causing prior to this method).

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:8

github_iconTop GitHub Comments

1reaction
sibirrercommented, Sep 12, 2019

@aymgal Should be fixed with the latest commit. The definition of delta_x_image are the offset relative to the ‘real’ image positions ra_image. Let me know if you still experience issues or please close the issue. Thanks

1reaction
sibirrercommented, Sep 12, 2019

The linear_response_set() splits the point sources in the sets of independent amplitudes, so this function is doing what it is supposed to do. The problem is that the updated astrometric displacement is not compatible with this anymore. Working on it and post here when I found a fix for this. Thanks

Read more comments on GitHub >

github_iconTop Results From Across the Web

Can't render JavaScript in requests-html / Can't run ... - GitHub
Hi, I'm trying to render JavaScript from webpages, but requests-html ... when rendering the JavaScript; version 0.9.2 is for non-javascript, ...
Read more >
Audio out of sync from Video - Kdenlive 0.9.2 - audiocodec aac
hi i am trying a new kdenlive and i have a huge problem - video is losing sync with audio i was trying...
Read more >
Troubleshoot issues exporting video on macOS - Adobe Support
Issue, Workaround 1. When rendering videos in Photoshop on macOS, the progress bar stops and doesn't progress any further.
Read more >
Gephi 0.9.2 not generating Graph after Subgraph created
1) I have run gephi using: /opt/gephi/gephi-0.9.2/bin$ LIBGL_ALWAYS_SOFTWARE=1 . ... Do you see data in the "Data Laboratory" after you issue the :>...
Read more >
Patch Notes — Sky: Children of the Light Help Center
Greetings Adventurers! We have a hotfix!Improvements and bug fixes in this update include:Improved stability issue affecting some low-end An... Hotfix - August ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found