uchrom.browser

The browser is GUI-only; the API below is mostly internal and subject to change. Typical usage is via python -m uchrom.browser.

U-Chrom structure browser.

Two front ends share this package:

  • desktop — PyVista + PyQt5 (MainWindow; browser extra)

  • web — FastAPI + Three.js (uchrom.browser.web; web extra)

Qt is imported lazily so the web browser works without PyQt5 installed. connect() (uchrom.browser.client) drives an open web browser from Python.

MainWindow

class uchrom.browser.main_window.MainWindow(*args: Any, **kwargs: Any)[source]

Bases: QMainWindow

add_canvas(orientation='h')[source]
add_canvas_hor()[source]
add_canvas_ver()[source]
add_widgets()[source]
adjust_camera(factor=2.0)[source]
change_current_canvas(new_ix)[source]
get_all_canvas()[source]
get_canvas_ix(canvas)[source]
init_draw()[source]
load_model(df, path: str = None)[source]
load_session_dialog()[source]
load_session_file(path: str)[source]
on_click_canvas(event)[source]
on_toggle_show_axis(*args)[source]
open_file_dialog()[source]
open_store_dialog()[source]

Pick a .chromdata.zarr store (a directory).

remove_canvas()[source]
resizeEvent(event)[source]

Handle window resize to keep navigation panel centered.

save_session(path: str)[source]
save_session_dialog()[source]
trigger_other_canvas_mouse_event(event)[source]
update_canvas_border_color()[source]