* MapCamModuleExplodeReuniteTest * * 1) Mapcam image 20190223T023051S790_map_iofL2pan.fits is ingested with ocams2isis and * spiceinited. * 2) phocube is used to create latitude, longitude, phase angle, emission angle, incidence * angle, and pixel resolution backplanes. * 3) explode app outputs the image backplanes into 7 separate cubes. * 4) cubeit reunites the explode
| 101 | * - 20190223T023051S790_map_iofL2pan_V001_cubeit.cub |
| 102 | */ |
| 103 | TEST(OsirisRexMapCamModules, MapCamModuleExplodeReuniteTest) { |
| 104 | QTemporaryDir tempDir; |
| 105 | |
| 106 | // ingest mapcam fits format image with ocams2isis and then spiceinit |
| 107 | QString mapCamFileName = tempDir.path() + "/20190223T023051S790_map_iofL2pan.cub"; |
| 108 | QVector<QString> ocams2isisArgs = {"from=data/osirisRexImages/ocams/20190223T023051S790_map_iofL2pan.fits", |
| 109 | "to=" + mapCamFileName}; |
| 110 | |
| 111 | UserInterface ocams2isisMapCam(OCAMS2ISIS_XML, ocams2isisArgs); |
| 112 | try { |
| 113 | ocams2isis(ocams2isisMapCam); |
| 114 | } |
| 115 | catch (IException &e) { |
| 116 | FAIL() << "Unable to run ocams2isis on mapcam fits file 20190223T023051S790_map_iofL2pan.fits: " |
| 117 | << e.what() << std::endl; |
| 118 | } |
| 119 | |
| 120 | QVector<QString> spiceinitArgs = {"from=" + mapCamFileName}; |
| 121 | UserInterface spiceinitMapCam(SPICEINIT_XML, spiceinitArgs); |
| 122 | try { |
| 123 | spiceinit(spiceinitMapCam); |
| 124 | } |
| 125 | catch (IException &e) { |
| 126 | FAIL() << "Unable to run spiceinit on mapcam image: " << e.what() << std::endl; |
| 127 | } |
| 128 | |
| 129 | // phocube mapcam image to create backplanes for latitude, longitude, phase angle, |
| 130 | // emission angle, incidence angle, and pixel resolution; |
| 131 | // dn=y propagates input pixel to output file |
| 132 | QString phocubeFileName = tempDir.path() + "/20190223T023051S790_map_iofL2pan_bp.cub"; |
| 133 | QVector<QString> phocubeArgs = {"from=" + mapCamFileName, |
| 134 | "to=" + phocubeFileName, |
| 135 | "dn=y", |
| 136 | "phase=y", |
| 137 | "emission=y", |
| 138 | "incidence=y", |
| 139 | "pixelresolution=y"}; |
| 140 | UserInterface phocubeUI(PHOCUBE_XML, phocubeArgs); |
| 141 | try { |
| 142 | phocube(phocubeUI); |
| 143 | } |
| 144 | catch (IException &e) { |
| 145 | FAIL() << "Unable to run phocube on mapcam image: " << e.what() << std::endl; |
| 146 | } |
| 147 | |
| 148 | // explode image backplanes into 7 cubes |
| 149 | QVector<QString> explodeArgs = {"from=" + phocubeFileName, |
| 150 | "to=" + tempDir.path() + "/20190223T023051S790_map_iofL2pan_V001"}; |
| 151 | UserInterface explodeUI(EXPLODE_XML, explodeArgs); |
| 152 | try { |
| 153 | explode(explodeUI); |
| 154 | } |
| 155 | catch (IException &e) { |
| 156 | FAIL() << "Unable to run explode on phocubed mapcam image: " << e.what() << std::endl; |
| 157 | } |
| 158 | |
| 159 | // reunite exploded cubes |
| 160 | // output should be identical to phocube bp output above |
nothing calls this directly
no test coverage detected