GithubHelp home page GithubHelp logo

Comments (5)

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

from rm-tools.

AlecThomson avatar AlecThomson commented on August 24, 2024

Hi Cameron,

Here's a script for making some dummy HEALpix data. This script saves out both cubes (2-D array) and maps (per frequency). The latter is the current HEALpix standard, but more cumbersome for broadband data sets.

I encountered the above issue when running the 2-D array formatted data. This data can be generated from either reading in a FITS cube or stacking the arrays from a bunch of maps.

There are downsides to each approach here. The FITS cube is not a HEALpix standard, but stores the data more efficiently. As HEALpix currently doesn't natively support cubes, saving individual maps preserves the standard, but is a pain for broadband data.

Cheers,
Alec

from rm-tools.

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

Hi Alec:

So I found that the problem with the reshape commands was already fixed in the CIRADA branch (based on the line numbers, it looks like you've been using the master branch?).

I'm not seeing any problems with indices in the RMSynth or RMClean codes when I run them. The outputs look as I expect them to.

I've spent the last few days redoing a lot of the input/output code to have more flexibility with the number of dimensions and also determining which axis is frequency (previously it was assuming the last axis was frequency, which wasn't the case for data produced by the HEALPIX dummy script?).

Can you try the most recent version (of the CIRADA branch) and see if you still get the same problems?

Thanks,
Cameron

from rm-tools.

AlecThomson avatar AlecThomson commented on August 24, 2024

Hi Cameron,

Whoops, yes sorry the numbers were from the master branch, but I think the bug is still present in CIRADA on lines 509/510.

I just tested on the dummy cubes I produces and RMsyth worked great. I'll note that the frequency first part was purely my choice for speed in the other processing I was doing and not a standard at all. For example GMIMS has frequency last. But, other codes such as cuFFs requires frequency first for speed, so I think the flexibility for both is great.

I now get the following error when attempting to run RMclean on the output of synth:

Traceback (most recent call last):
  File "/home/athomson/bin/RM-tools/RMtools_3D/do_RMclean_3D.py", line 214, in <module>
    main()
  File "/home/athomson/bin/RM-tools/RMtools_3D/do_RMclean_3D.py", line 99, in main
    write_separate_FDF=args.write_separate_FDF)
  File "/home/athomson/bin/RM-tools/RMtools_3D/do_RMclean_3D.py", line 140, in run_rmclean
    doPlots          = False)
  File "/home/athomson/bin/RM-tools/RMtools_3D/RMutils/util_RM.py", line 472, in do_rmclean_hogbom
    nPhi = phiArr_radm2.shape[0]
AttributeError: 'list' object has no attribute 'shape'

from rm-tools.

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

Hi Alec:

Aha, I forgot to update RMclean_3D when I updated RMSynth_3D. I've done that today. I found the exactly problems you reported, and they should now be fixed. Rather than using the transpose on fwhmRMSFArr, I redefined it to have the expected shape (for 2D input data, it appends an additional (degenerate) dimension; but it was putting it on the wrong axis and thus breaking things).

So it should be working now? I think it's working for the (FREQ x HEALPIX) data, and I don't think I've broken anything for (POSITION x POSITION x FREQ) input cubes. I'm not entirely sure if my rapidly spliced-together new read-in code will work as intended for other possible configurations, but that's a problem for another day.

Cheers,
Cameron

from rm-tools.

Related Issues (1)

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.