Skip to content

Repository files navigation

DewWait

Know how long cold equipment should stay sealed before warm, humid air can condense on it.

DewWait is a small offline command-line planner for photographers, filmmakers, amateur astronomers, and field technicians. Give it the destination temperature and humidity plus each item's starting temperature and measured thermal time constant. It computes the dew point, solves each item's warm-up curve, and exports an auditable wait plan.

It does not promise that equipment is safe. It turns your measurements and chosen margin into a consistent estimate; manufacturer guidance still wins.

The problem

Moving a cold camera, lens, telescope part, film canister, or electronic device into warmer humid air can cause condensation. Manufacturers commonly recommend sealing cold equipment in a bag and letting it acclimate. A fixed “wait an hour” rule cannot account for the room's dew point or the different thermal response of a metal lens and a light accessory.

DewWait answers a narrower, checkable question:

Under stable destination conditions, when does the first-order model put every listed item above dew point + safety margin?

Install

Python 3.11 through 3.14 is supported. Install the wheel from the GitHub Release:

python -m pip install https://github.com/KanadeK/dewwait/releases/download/v0.1.0/dewwait-0.1.0-py3-none-any.whl

Or install an isolated command with uv:

uv tool install https://github.com/KanadeK/dewwait/releases/download/v0.1.0/dewwait-0.1.0-py3-none-any.whl

60-second quick start

Generate a complete report from the built-in real scenario:

dewwait demo --out reports/demo

Expected terminal result:

wait 65 minutes; reports: reports/demo

The command writes:

  • reports/demo/report.html — a standalone human-readable summary;
  • reports/demo/report.json — the complete machine-readable decision; and
  • reports/demo/timeline.csv — one row per equipment item.

Open the HTML file locally or inspect the JSON:

{
  "critical_item_id": "camera-body",
  "recommended_wait_minutes": 65,
  "status": "wait"
}

The actual JSON contains the input, derived dew point and target temperature, every item result, reasons, model identifier, and limitations as well.

Plan your own move

Create scenario.json:

{
  "schema_version": 1,
  "name": "Cold camera into humid greenhouse",
  "environment": {
    "temperature_c": 28.0,
    "relative_humidity_percent": 75.0
  },
  "safety_margin_c": 2.0,
  "max_wait_minutes": 180,
  "items": [
    {
      "id": "camera-body",
      "initial_temperature_c": 4.0,
      "thermal_time_constant_minutes": 30.0
    },
    {
      "id": "front-element",
      "initial_temperature_c": 4.0,
      "thermal_time_constant_minutes": 20.0
    }
  ]
}

Validate it, then make reports:

dewwait validate scenario.json
dewwait plan scenario.json --out reports/greenhouse

For the included values, camera-body is the limiting item and the conservative whole-minute recommendation is 65 minutes.

How to obtain a time constant

DewWait deliberately does not guess device properties. For a representative sealed setup, record the item's temperature during a stable cold-to-warm test. The thermal time constant is approximately the time needed to complete 63.2% of the total temperature change. Repeat if packaging or airflow changes, and use a conservative representative value.

Do not run a calibration that conflicts with the equipment manufacturer's temperature, humidity, or handling limits.

Statuses and automation

Exit code Meaning What to do
0 Feasible plan, including zero wait Follow the report while keeping the stated assumptions in mind
1 Valid scenario but blocked Lower humidity, reduce the requested margin, allow more time, or follow a different manufacturer-approved procedure
2 Invalid input, command, or output path Correct the field/path named in stderr and rerun

A valid blocked scenario still produces reports explaining the failure. Invalid input produces no report directory.

Examples in this repository exercise all three outcomes:

dewwait plan examples/cold-to-humid.json --out reports/success
dewwait plan examples/already-safe.json --out reports/already-safe
dewwait plan examples/saturated-room.json --out reports/blocked
dewwait plan examples/bad-relative-humidity.json --out reports/invalid

The third command exits 1; the fourth exits 2.

How it works

DewWait uses the US National Weather Service dew-point relationship, then solves a first-order lumped thermal response for each item:

T_item(t) = T_ambient + (T_initial - T_ambient) * exp(-t / tau)

The target is dew point + safety_margin_c. An item already at or above the target has zero wait. If ambient temperature is not above the target, passive warming cannot reach it and the plan is blocked. Otherwise DewWait solves the threshold time analytically and rounds up to a whole minute.

Sony's camera condensation guidance and Canon's camera manual are examples of manufacturer advice to seal cold equipment before moving it into a warm place and wait for it to acclimate.

Known limitations

  • This is a planning estimate, not certification, a condensation sensor, or a guarantee against damage.
  • Accuracy depends on the user-supplied thermal time constant being representative of the item, bag/case, airflow, and setup.
  • Destination temperature and humidity are assumed stable.
  • The model does not cover active heaters, evaporation, changing weather, moisture already inside a bag, multilayer heat transfer, or internal device temperatures.
  • It does not know manufacturer-specific material or operating limits.
  • Manufacturer instructions supersede DewWait output.

Troubleshooting

relative_humidity_percent must be greater than 0

Use a measured percentage in (0, 100], not a fraction such as 0.75 for 75%.

cannot reach ... by passive warming

The chosen safety target is at or above ambient temperature. Lower destination humidity, choose a justified smaller margin, or follow a manufacturer-approved active/different procedure. Simply waiting longer cannot satisfy this model.

required wait ... exceeds max_wait_minutes

Increase the limit only if that wait is acceptable, improve the destination conditions, or defer the move.

scenario file must be UTF-8 or invalid JSON

Save the file as UTF-8 JSON and use the field layout shown above. DewWait rejects unknown fields so misspellings are not silently ignored.

The dewwait command is not found after installation

Run python -m dewwait --version. If that works, add your Python scripts directory to PATH, or use the isolated uv tool install command above.

Development

Clone the repository, install the locked environment, and run the one acceptance command used by CI:

git clone https://github.com/KanadeK/dewwait.git
cd dewwait
uv sync --locked
uv run --locked python scripts/check.py

The gate checks formatting, linting, strict types, tests and coverage, all example outcomes, wheel/sdist contents, clean installation, the installed entry point, README commands, dependency audit, and Git whitespace.

See SPEC.md for the complete behavior contract, docs/research.md for near-neighbor evidence, and CONTRIBUTING.md before sending a change.

License

MIT

About

Plan sealed acclimation time for cold equipment entering warm, humid air

Topics

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages