Beginner level projection |
Beginner level projection |
Nov 6 2019, 11:50 PM
Post
#1
|
|
Junior Member Group: Members Posts: 31 Joined: 31-October 19 Member No.: 8699 |
Hi,
I'm trying to do the mapping just using SPICE for the Junocam images rather than going through ISIS. It might seem like I'm making life difficult for myself but I just wanted to make sure I'm doing the bare minimum amount of processing so it looks as close to a non-spinny-push-frame image as I can. I'm making all the beginner mistakes but I can't seem to figure out what they are so I was hoping someone might give me a hint? First I want to figure out how far Jupiter is because I want to have anything that didn't hit Jupiter get mapped to a sphere that hits Jupiter. This means any lens effects can get mapped in space near where they originated from which should hopefully make the edges of the planet seem less processed: [jupiterPos, jupiterLt] = spice.spkpos('JUPITER', et0, 'JUNO_SPACECRAFT', 'NONE', 'JUNO') jupiterDistance = np.linalg.norm(jupiterPos) Then I go through all the undistorted Junocam pixel vectors and figure Jupiter intercept points in the IAU_JUPITER frame so now I have a point cloud of all the planet mapped pixels: [point, trgepc, srfvec, found ] = spice.sincpt( 'Ellipsoid', 'JUPITER', et, 'IAU_JUPITER', 'LT+S', 'JUNO_SPACECRAFT', 'JUNO_JUNOCAM', v) If it didn't find an intersection then I figure out where that invisible sphere is going to be by extending out the pixel vector by the separation and move that to the IAU_JUPITER frame: direction = np.array(v) pos = direction*jupiterDistance/np.linalg.norm(direction) rotationMatrix = spice.pxform('JUNO_JUNOCAM','IAU_JUPITER',et-jupiterLt) pos = spice.mxv(rotationMatrix, pos) It works terribly! I seem to have a timing error in the frame offsets that seems suspiciously close to the light time between Jupiter and Juno and the sphere that catches all the sincpt misses is completely miles off. I've been staring at the code for a while and not figuring my mistake, I was hoping someone might point out where I've gone wrong. Many thanks Adam |
|
|
Nov 12 2019, 05:59 PM
Post
#2
|
|
Junior Member Group: Members Posts: 31 Joined: 31-October 19 Member No.: 8699 |
Thanks mcaplinger, I've changed it to the following, with the terrible frac in there to line the sphere thing up with the visible edge, I think you can tell what I'm up to from the plot now.
[jupiterPos, jupiterLt] = spice.spkpos('JUPITER', et0, 'IAU_JUPITER', 'NONE', 'JUNO') pos = frac*direction*jupiterDistance/np.linalg.norm(direction) rotationMatrix = spice.pxfrm2('JUNO_JUNOCAM','IAU_JUPITER',et, et-jupiterLt*frac) pos = spice.mxv(rotationMatrix, pos) pos -= jupiterPos I've reasoned that the first pos assignment gets where it should be in the camera frame, the rotation does all the light time magic and the subtraction gets the resulting vector translated to Jupiter. It seems to work but it would be comforting if someone could say if this is nonsense that worked by chance. My use of the word "magic" gives an idea of my proficiency in these things. I switched to the juno_sc_rec_170831_170902_v01.bc kernel like you said and I had to add 10ms to get the edge to line up which agrees with what you said earlier. Brian, I see your code uses limbpt to find the limb, is that the easiest way do you think? Many thanks Adam |
|
|
Nov 12 2019, 11:44 PM
Post
#3
|
|
Member Group: Members Posts: 411 Joined: 18-September 17 Member No.: 8250 |
Brian, I see your code uses limbpt to find the limb, is that the easiest way do you think? I don't recall being aware of edlimb when I developed the code that uses limbpt. edlimb looks like a simpler interface, and is probably much faster than limbpt. However, I notice the edlimb example uses a light time correction relative to Jupiter's center. In limbpt, specifying the aberration correction locus corloc="ELLIPSOID LIMB" applies light time correction to each limb point. Since the distance to the limb can be as low as 22000km, there could be a difference in light times of 151ms which is equivalent to about 47 pixels. When everything is working correctly, (and you have a good estimate for the image start time) you should be able to identify spice limb pixels on both the moon and jupiter. (Staying aware that spice limb pixels on jupiter may be slightly within the junocam visible limb). When the "Limb Marking" code in the Juno3D pipeline is enabled, it marks pixels along the limb in the raw data prior to processing, which can be handy for debugging and start time jitter analysis. |
|
|
Lo-Fi Version | Time is now: 29th May 2024 - 06:33 PM |
RULES AND GUIDELINES Please read the Forum Rules and Guidelines before posting. IMAGE COPYRIGHT |
OPINIONS AND MODERATION Opinions expressed on UnmannedSpaceflight.com are those of the individual posters and do not necessarily reflect the opinions of UnmannedSpaceflight.com or The Planetary Society. The all-volunteer UnmannedSpaceflight.com moderation team is wholly independent of The Planetary Society. The Planetary Society has no influence over decisions made by the UnmannedSpaceflight.com moderators. |
SUPPORT THE FORUM Unmannedspaceflight.com is funded by the Planetary Society. Please consider supporting our work and many other projects by donating to the Society or becoming a member. |