openairclim.gui.tabs.aircraft

Aircraft tab: define aircraft identifiers and per-aircraft contrail parameters. This data can live in two places:

  • inline in the config, under config[“aircraft”][<ac_id>]; or

  • in a separate CSV file (config[“aircraft”][“dir”]/[“file”].

Both sources support deriving G_250 from sub-values (SAC_eq, Q_h, eta, eta_elec, EIH2O, R) and PMrel from PM, when the direct value is missing: csv rows via load_ac_data, config-inline entries via _derive_missing_ac_params. This tab lets either be edited directly or derived: the”Calculate G_250/PMrel from sub-values” button can be used to fill in any blank G_250/PMrel cells from their sub-values.

A direct value and its sub-values may both be present at once (e.g. right after “Calculate”, or because a user keeps sub-values on hand for reference) - core always silently prefers the direct value and ignores the sub-values. This tab never deletes sub-values on the user’s behalf; the completeness check only warns when they’re both present and actually disagree (compares the sub-value-derived value against the stored direct value, within the same rounding tolerance core uses when deriving one itself).

Table edits are synced into edited_config/the local CSV state immediately, but the completeness/consistency check (“Check completeness” button) and the sub-value calculation only run on button-press, rather than on every keystroke, to keep large tables responsive.

Core does not tolerate an aircraft identifier defined in-line in the config and in a linked csv file. Therefore, this tab keeps the two mutually exclusive per identifier: one row per aircraft in a single table, with a “source” column. Changing a row’s source moves its data between edited_config and a locally-held CSV DataFrame, which is only written to disk on Save (mirroring the sidebar’s config Save). edited_config[“aircraft”][“types”] is kept in sync automatically.

openairclim.gui.tabs.aircraft.panel(state)[source]

Return the aircraft tab content.

Parameters:

state (AppState) – Shared application state.