Giter VIP home page Giter VIP logo

Comments (5)

Cameron-Van-Eck avatar Cameron-Van-Eck commented on August 10, 2024 1

Hi Jaswanth:

Thanks for the files. I've taken a look, and I at least partially understand the issue. The cause seems to be the use of the Stokes I cube. It's not intended that rmsynth3d should be fed an observed Stokes I cube, because those values are used directly for dividing Stokes Q and U and the observed cubes are typically very noisy (this is not very well explained in the documentation; I will improve that). I haven't tracked down the exact reason why the Stokes I cube is causing the outputs to be zeros -- I'll do that soon because there's probably an interesting bug hidden in there -- but I have found that not using the I cube does solve the problem.

The intended usage is to either not incorporate the Stokes I information (just using Q and U), or to use a Stokes I model. There is a tool for creating Stokes I model cubes: rmtools_fitIcube aka RMtools_3D/do_fitIcube.py. This tool can generate a smooth Stokes I model cube given an observed cube. I did find a bug in that script when testing it with your data -- I've released an update here on the Github, but not to Pypy. Something like: rmtools_fitIcube T200324_I_ncell30_cube_masked.fits Ncell30_FREQ_T200324.dat -p -2 -o model_ -v should work. I've confirmed that if you run rmsynth3d either with no Stokes I cube, or with the model cube, the outputs look reasonable.

As a side note, you've set your Faraday depth sampling (-d option) very small, which increases compute time and output size considerably. Given that your data produces an RMSF of over 400 rad/m2, you don't really need a sampling smaller than 20 rad/m^2. Even a much coarser value like 50 would probably be fine.

Cheers,
Cameron

from rm-tools.

Cameron-Van-Eck avatar Cameron-Van-Eck commented on August 10, 2024

Hi @Jaswanth-Jza:

That's definitely strange behaviour. Since it looks like your (frequency) cubes are fairly small, would you be willing to email them to me (along with the frequency file). That'll make it easier for me to diagnose what's going on. Please send them to [email protected].

Cheers,
Cameron

from rm-tools.

Jaswanth-Jza avatar Jaswanth-Jza commented on August 10, 2024

Thank you for your quick response! I just emailed the files to you!

from rm-tools.

Jaswanth-Jza avatar Jaswanth-Jza commented on August 10, 2024

Hello Cameron,

Thank you! I will try the sokes I model cube, I did not try it without stokes I but I need to do it and the model methods helps me with this.
Thanks again for giving me a solution for this issue!

from rm-tools.

Cameron-Van-Eck avatar Cameron-Van-Eck commented on August 10, 2024

I've figured out why the output FDF cubes are completely zeros, so I'm going to make some notes here for my own future reference:

When a Stokes I cube is supplied, after RM synthesis it uses the value of Stokes I at lambda^2_0 to re-normalize the FDF cube into the same units as Stokes IQU. Jaswanth's data has an unusual property: the Stokes I cube has two zeroed out channels right in the middle, so when the code goes to re-normalize, it interpolates between those channels (interpolating between 0 and 0, haha), then multiplies the FDF cube by that value (producing the zero cube).

It's quite unexpected. I don't expect this to come up again, so I'm not prioritizing any changes to the code. I suppose the simple solution is that users shouldn't be putting in cubes with completely blank channels (in principle, if it's a Stokes I model and not data with missing channels, this shouldn't happen either). I need to go back and make the documentation more clear that Stokes I cubes must be models, not data...

from rm-tools.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.