Scanning the ground is exactly what it was doing.
The DC-8 N817NA is an airborne laboratory that is used for a wide variety of tests, trials, research, & experiments supporting federal, state, scientific agencies.
With the recent seismic activity it was monitoring the movement etc of the fault line, carrying out assessments of damage etc.
https://www.nasa.gov/centers/armstrong/news/FactSheets/FS-050-DFRC.html