Scénario de test & Cas d'usage
Simulation of a single high-precision sensor reading (2x2 matrix). We also include a 'batch_code' variable to test the copyVars functionality.
| 1 | DATA sensor_calib; |
| 2 | LENGTH batch_code $10; |
| 3 | batch_code = 'BATCH_X99'; |
| 4 | DO i = 1 to 4; |
| 5 | raw_signal = 123456; /* Large integer for higher bit depth context */ |
| 6 | OUTPUT; |
| 7 | END; |
| 8 | RUN; |
| 9 | |
| 10 | PROC CASUTIL; |
| 11 | load DATA=sensor_calib outcaslib='casuser' casout='sensor_data' replace; |
| 12 | RUN; |
| 1 | PROC CAS; |
| 2 | image.condenseImages / |
| 3 | TABLE={caslib='casuser', name='sensor_data'}, |
| 4 | width=2, |
| 5 | height=2, |
| 6 | numberOfChannels=1, |
| 7 | depth='BIT32', |
| 8 | inputs={{name='raw_signal'}}, |
| 9 | copyVars={'batch_code'}, |
| 10 | casOut={caslib='casuser', name='sensor_image_32bit', replace=true}; |
| 11 | RUN; |
The resulting 'sensor_image_32bit' table must contain one image row. The 'batch_code' column should appear with the value 'BATCH_X99'. The binary image data should reflect a 32-bit depth encoding as requested.