ivezic / dusty

Radiative transfer code Dusty
BSD 3-Clause "New" or "Revised" License
12 stars 3 forks source link

Intensity Images : Discrepancy of one order of magnitude between v2 and v4 #4

Closed jdrevon closed 4 years ago

jdrevon commented 4 years ago

Hello :) I'm back again !

I made the visibility routine for the v2 and checked the convergence : that's ok, it works BUT when I do the same thing with the same initial parameter with the V4, I have the same outputs in the file sphere1.out but in the image files sphere.i00xx i have a discrepancy of roughly one order of magnitude in the intensity and then the visibilities estimated by my routine start to be crazy :/ I made a test for different density profile of the dust : RWA, RW, POWD... and different dust mixtures but the discrepancy between the two still stays on. Is it something that I did wrong or you can reproduce also this bug?

Here is the V2 and V4 folder that you can download directly with all my input parameters to check by yourself and maybe reproduce the bug :

https://we.tl/t-kJ9bS40tJq

The dusty folder is the V2 and dusty_master is the V4

Thank you in advance

Best Regards

Julien

jdrevon commented 4 years ago

Update :

I also tried to DL the raw files from dusty v2 ( dusty-master ==> release v2), keep the original configuration and change the minimum of parameter and generate the image for the same object with dusty v2 and v4 (dusty-master ==> release ==> dusty (after applying the sh command that you asked to use written in the footprint of the dusty-master on github)) and the bug is still stays on taking just the raw software without modifying deeply the files.

Or maybe i'm wrong and the good one is release v2 i don't know (I thought release v2 was dustyV2 due to the fact that the documents are marked by the DustyV2 label from 1999, the one with some minor 2007 improvements and works with the DUSTYV2 parameter and not the v4 one).

Julien

ivezic commented 4 years ago
          Hi Julien,

I think you found a bug in the V4 code! When going from V2 to V4, some internal definitions of the various quantities were modified, but one of them was not properly followed up to the code that computes intensity. That is why the central intensity peak, due to the star, was 4*pi times erroneously larger than the correct version in V2. I just fixed it and pushed everything to repo. You should be now able to recompile V4 (you need to regenerate a new release) and reproduce V2 results for the intensity (I verified so on my machine). Please confirm that it went well! Thanks again for your interest in Dusty and for reporting this bug!

jdrevon commented 4 years ago

Hi, Perfect! This works :) Thank you again for your reactivity and kindness!