Closed nschorgh closed 2 years ago
(Just seen it now) What would you like to model with that addition? An extended Sun disk or some terrain property?
The permanently shadowed regions of Ceres with a point-like sun. But you will also need this for Haworth, which spans a non-negligible range of latitudes.
Ok, I was just asking because I already had to implement/use modifications for a non-pointlike Sun for Mercury, and wondered if those could be useful here.
The existing Dsun.ndim==2
option was presumably intended for a non-pointlike Sun, but this returns a much bigger array.
Ah ops, already pushed it and forgot about. Erase that, sorry. I'll check your mods!
I haven't modified anything in shape.py
I meant those here in the issue :)
This is a useful thing to add, I agree. Please feel free to include it and make a pull request or just commit the change.
I just tried to re-implement this, but now basemesh
is some sort of higher dimensional object as soon as Dsun.ndim==2
, so I can't get this line to work I = ~basemesh.is_occluded(np.arange(self.num_faces), Dsun)
even if I explicitly loop through the triangles.
@sampotter Thanks!
I still get a strange error about ndarray not being C-contiguous, although the very same program works if I only use a single dir_sun
vector.
Try
./examples/ceres/generate_mesh_from_grd.py
./examples/ceres/psr_ceres.py
That's easy to solve (I recently learnt from Sam): just change your vector to v=v.copy(order='C').Happy holidays, too!Stefano -------- Messaggio originale --------Da: Norbert Schörghofer @.> Data: 24/12/21 1:45 AM (GMT+01:00) A: sampotter/python-flux @.> Cc: Stefano Bertone @.>, State change @.> Oggetto: Re: [sampotter/python-flux] Different incidence angle for each pixel (Issue #41) @sampotter Thanks! I still get a strange error about ndarray not being C-contiguous, although the very same program works if I only use a single dir_sun vector. Try ./examples/ceres/generate_mesh_from_grd.py ./examples/ceres/psr_ceres.py
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you modified the open/close state.Message ID: @.***>
Thanks. That got me one step closer.
Works now. Had to change one line in shape.py
though.
Please consider this addition to
shape.py
, which allows each pixel to have a different incidence angle. This will interpret an array of sun directions of the same length as the number of topographic pixels as a lat/lon dependence.And the value of
m
will have to be assigned outside of the previous if construct.