Skip to content

Output files

A run can leave three kinds of file: a table of looks, a report, and a recording. Scenario files are described on their own page.

Looks

radarsim --headless … --out looks.csv writes one row for every time the beam dwelt on a target, detected or not. With a name ending in .json the same rows are written as a list of objects.

Column Meaning
target_id, time which object, and when [s]
true_range_m, true_azimuth_deg, true_elevation_deg where it was
measured_range_m, measured_azimuth_deg what the radar measured; empty without a detection
snr_db signal to noise, clutter and jamming for one pulse, after pulse compression and MTI
pd, is_detected probability of detection for the dwell, and the draw
illuminated, terrain_masked, below_horizon whether an echo was possible at all
apparent_range_m, range_trip where the echo shows with a range-ambiguous PRF, and how many times it is folded
pulses_integrated hits in the dwell
beam_shape_loss_db, elevation_pattern_loss_db, eclipsing_loss_db, doppler_mismatch_loss_db, atmospheric_loss_db, rain_attenuation_db losses of this look
propagation_factor_db multipath, \(F^4\); positive on a lobe
mti_response_db response of the canceller to the target's radial velocity
pulse_compression_gain_db time-bandwidth product
surface_sigma0_db, surface_cell_area_m2, surface_clutter_rcs_m2, surface_clutter_model the clutter patch in the target's cell
surface_clutter_loss_db, rain_clutter_loss_db, jammer_loss_db what clutter and jamming cost in SNR
jammer_jsr_db jamming to signal at the receiver input; empty without jamming
receiver_input_power_dbm, receiver_headroom_db, receiver_clipping_loss_db, receiver_overloaded the receiver's limiter

Angles are in degrees, azimuth clockwise from North. The rows are those of engine.log.detection_history, each a DetectionResult.

In a network the file holds the looks of the first radar.

Report

File → Export report… (Ctrl+E) in the interface, or from Python:

from radarsim.io.report import build_report, write_report

write_report(build_report(engine, "my run"), "report.json")

The JSON report has

Key Content
scenario, simulated_time_s, seed what was run
objects per object: id, name, type, affiliation, looks, detections, pd_empirical, first_detection_s, first_detection_range_km, median_snr_db
tracks the tracks at the end: id, status, hits, x_m, y_m
events the event log: time, kind, message, target_id, track_id, params
network only with several radars: radars (name, position, looks, detections, established tracks), link_delay_ms, fused_tracks, jammer_fixes

With a name ending in .csv the report is the object table followed by the event table, for a spreadsheet.

The kinds of event are deployed, first_detection, track_initiated, track_confirmed, track_lost, masked, unmasked, jammed, burn_through, range_ambiguous, jammer_located and model_limit. The last one is written when a model was left out of a look because the scenario is outside its range of validity; a report with such events deserves a second look. message is English; params holds the same facts as values, which is what the interface words in Turkish.

Recording

Tools → Record session (Ctrl+R), or --record run.h5 on the command line, writes what the displays were shown, frame by frame. File → Open recording… plays it back on the same displays, with the transport bar as a time line. A recording made from the command line has one frame per simulation step; one made in the interface has one per display frame.

Recordings need h5py, which comes with radarsim[gui] or radarsim[recording].

The file is HDF5, format version 2. Each kind of record is one table, a compound dataset that grows, and a frame says which rows are its own.

Dataset Content
attributes of / format_version, radarsim_version, created (UTC), scenario_name, seed (−1: none), dt
/scenario the scenario as JSON, complete enough to run it again
/frames per frame: time, dt, radar position, antenna azimuth, the sectors swept since the last frame, running counts of looks and detections, and for each table below the first row and the number of rows of this frame
/targets truth and last look of every object in the frame
/tracks the tracks: state, covariance, hits, misses, quality, height, turn probability
/false_targets echoes of repeater jammers
/plots detections with their own time: position, range, azimuth, SNR, and the id of what made them (−1 noise, −2 clutter)
/events, /event_text, /event_params the event log
/radar_states radar parameters and settings as JSON, written when they change
/target_info name, type and affiliation of an object as JSON, when they change
/network/… with several radars: the other sites, their tracks and strobes, fused tracks, jammer fixes

Positions are ENU in metres, angles in radians, times in seconds. Rows are written every 64 frames, so a long run does not pile up in memory and a crash loses at most that many frames. The range–Doppler map is not recorded.

For analysis the tables are numpy structured arrays:

from radarsim.io.recording import Recording

rec = Recording("run.h5")
print(rec.scenario_name, rec.seed, rec.frame_count, rec.duration)

confirmed = rec.tracks[rec.tracks["status"] == 1]      # 0 tentative, 1 confirmed, 2 coasting
noise_plots = rec.plots[rec.plots["target_id"] == -1]
frame = rec.frame_at(12.0)                             # what the displays showed at t = 12 s

Any HDF5 tool reads the same tables (h5dump, HDFView, MATLAB's h5read).

Format 1

Recordings of 4.x hold the true position of every target and one SNR, nothing of what the radar made of them. They still open: the interface shows the targets moving and leaves plots and tracks empty. radarsim.io.recording.recording_version(path) tells the two apart, and radarsim.io.replay_loader.ReplayLoader reads format 1.