Giter Club home page Giter Club logo

cds-healpix-rust's People

Contributors

berke avatar bmatthieu3 avatar fxpineau avatar gmantele avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cds-healpix-rust's Issues

Errors in tests

@fxpineau - If I try to run the tests I get these errors:

(gammapy-dev) hfm-1804a:cds-healpix-rust deil$ cargo test
warning: unused manifest key: package.edition
    Updating registry `https://github.com/rust-lang/crates.io-index`
   Compiling katex-doc v0.1.0                                                   
   Compiling cdshealpix v0.2.0 (file:///Users/deil/work/code/cds-healpix-rust)
error[E0433]: failed to resolve. Use of undeclared type or module `std`
   --> src/nested/bmoc.rs:908:35
    |
908 |   pub fn to_ranges(&self) -> Box<[std::ops::Range<u64>]> {
    |                                   ^^^ Use of undeclared type or module `std`

error[E0433]: failed to resolve. Use of undeclared type or module `std`
   --> src/nested/bmoc.rs:909:25
    |
909 |     let mut ranges: Vec<std::ops::Range<u64>> = Vec::with_capacity(self.entries.len());
    |                         ^^^ Use of undeclared type or module `std`

error[E0658]: `crate` in paths is experimental (see issue #45477)
 --> src/external_edge.rs:5:5
  |
5 | use crate::compass_point::{Cardinal, Ordinal};
  |     ^^^^^

error[E0658]: `crate` in paths is experimental (see issue #45477)
    --> src/lib.rs:1340:5
     |
1340 | use crate::compass_point::{MainWind};
     |     ^^^^^

error[E0658]: `crate` in paths is experimental (see issue #45477)
    --> src/lib.rs:1341:5
     |
1341 | use crate::compass_point::MainWind::*;
     |     ^^^^^

error: aborting due to 5 previous errors

Some errors occurred: E0433, E0658.
For more information about an error, try `rustc --explain E0433`.
error: Could not compile `cdshealpix`.
warning: build failed, waiting for other jobs to finish...
error[E0433]: failed to resolve. Use of undeclared type or module `std`
   --> src/nested/bmoc.rs:908:35
    |
908 |   pub fn to_ranges(&self) -> Box<[std::ops::Range<u64>]> {
    |                                   ^^^ Use of undeclared type or module `std`

error[E0433]: failed to resolve. Use of undeclared type or module `std`
   --> src/nested/bmoc.rs:909:25
    |
909 |     let mut ranges: Vec<std::ops::Range<u64>> = Vec::with_capacity(self.entries.len());
    |                         ^^^ Use of undeclared type or module `std`

error[E0554]: #![feature] may not be used on the stable release channel
 --> src/lib.rs:9:19
  |
9 | #![cfg_attr(test, feature(test))]
  |                   ^^^^^^^^^^^^^^

error[E0658]: `crate` in paths is experimental (see issue #45477)
 --> src/external_edge.rs:5:5
  |
5 | use crate::compass_point::{Cardinal, Ordinal};
  |     ^^^^^

error[E0658]: `crate` in paths is experimental (see issue #45477)
    --> src/lib.rs:1340:5
     |
1340 | use crate::compass_point::{MainWind};
     |     ^^^^^

error[E0658]: `crate` in paths is experimental (see issue #45477)
    --> src/lib.rs:1341:5
     |
1341 | use crate::compass_point::MainWind::*;
     |     ^^^^^

error: aborting due to 6 previous errors

Some errors occurred: E0433, E0554, E0658.
For more information about an error, try `rustc --explain E0433`.
error: Could not compile `cdshealpix`.

To learn more, run the command again with --verbose.

This is on macOS with rust installed via Homebrew. This is what I have:

(gammapy-dev) hfm-1804a:cds-healpix-rust deil$ rustc --version
rustc 1.27.0
(gammapy-dev) hfm-1804a:cds-healpix-rust deil$ cargo --version
cargo 1.26.0

Can you reproduce?
Do I need a newer version of rust?

Feature request: unproj (pix2ang) for gpu

There is already a proj code that is adaptable for running on GPU and it works very well in Aladin Lite. It is used for getting the HEALPix index of a sky coo in order to retrieve the good tile texture image to plot for that sky coo.

Would it be possible to have the unproj method this time that would be adaptable for gpu too ? :)

My use case is the following:
I would like to benefit the fact that HEALPix cell on the HEALPix space are simple squares to use GPU instancing ( https://en.wikipedia.org/wiki/Geometry_instancing ) to render many of them (e.g. many filled cells of a MOC). This could drastically reduce the size of the buffer sent to the GPU from 4 vertices*2 floats per cell to 2 floats encoding the center of the cell in the HPX space + 1 float encoding its size so 3 floats per cell instead of 8 floats. The only thing I am concerned with is that once I do the unproj to get the sky coo of my vertex then I will have to project it again in the aladin lite view projection (which could add some precision issues because the projection is done on a float and not a double). Nonetheless I would like to test it to see if this is working, I am pretty sure that if the precision is not so much of an issue then there could be very efficient to render many HEALPix cells.

Assertion failure on polygon_coverage with triangle crossing the antimeridian

Hello,

I get assertion failed: intersect2.lon() < p2.lon() at special_points_finder.rs:428:7 with the following code:

    let bad = [(f64::PI, 1.000),
	       (-f64::PI + 1e-3, 1.001),
	       (f64::PI - 1e-3, 1.002)];
    let lay = hp::nested::get(4);
    let _ = lay.polygon_coverage(&bad,true);

This doesn't happen if exact_solution is false.

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.