{"id":9470,"library":"aot-biomaps","title":"Acousto-Optic Tomography Biomaps","description":"Aot-biomaps is a Python library providing tools for processing and visualizing Acousto-Optic Tomography (AOT) data, specifically focusing on generating biomaps from raw measurement files. It is currently at version 2.9.504 and appears to have an irregular release cadence, often tied to updates in its parent AOT repository. It facilitates the conversion of AOT data into meaningful spatial representations.","status":"active","version":"2.9.504","language":"en","source_language":"en","source_url":"https://github.com/LucasDuclos/AcoustoOpticTomography/tree/main/biomaps","tags":["acousto-optic tomography","biomaps","signal processing","data visualization","scientific computing"],"install":[{"cmd":"pip install aot-biomaps","lang":"bash","label":"Install stable version"}],"dependencies":[{"reason":"Fundamental for numerical operations and array manipulation.","package":"numpy"},{"reason":"Used for scientific computing, signal processing, and optimization.","package":"scipy"},{"reason":"Essential for plotting and data visualization.","package":"matplotlib"},{"reason":"Provides algorithms for image processing.","package":"scikit-image"},{"reason":"Used for optimizing Python code for speed.","package":"numba"},{"reason":"Displays progress bars for loops and operations.","package":"tqdm"},{"reason":"Optional: Provides computer vision functionalities.","package":"opencv-python","optional":true}],"imports":[{"note":"PyPI package names (with hyphens) are typically imported with underscores.","wrong":"from aot-biomaps import Biomap","symbol":"Biomap","correct":"from aot_biomaps import Biomap"},{"symbol":"biomap_processing","correct":"from aot_biomaps import biomap_processing"}],"quickstart":{"code":"import os\nfrom aot_biomaps import Biomap\n\n# NOTE: This library heavily relies on specific folder structures and calibration files.\n# Replace these with actual paths to your AOT data and calibration files.\n# Dummy paths are used here for demonstration purposes.\n\ndummy_folder_path = os.path.join(os.path.dirname(__file__), 'dummy_aot_data')\ndummy_calibration_path = os.path.join(os.path.dirname(__file__), 'dummy_calibration.txt')\n\n# Create dummy files for the example to run without FileNotFoundError\n# In a real scenario, these would be your actual AOT measurement data.\nif not os.path.exists(dummy_folder_path):\n    os.makedirs(dummy_folder_path)\nwith open(os.path.join(dummy_folder_path, 'measurement_0001.txt'), 'w') as f:\n    f.write('0 0 0\\n1 1 1')\nwith open(dummy_calibration_path, 'w') as f:\n    f.write('1.0 0.0 0.0\\n0.0 1.0 0.0\\n0.0 0.0 1.0')\n\ntry:\n    # Initialize the Biomap object\n    my_biomap = Biomap(folder_path=dummy_folder_path, calibration_path=dummy_calibration_path)\n\n    # Example: Process data (replace with actual processing steps)\n    # These methods might require specific data formats to succeed\n    print(f\"Biomap initialized with shape: {my_biomap.img_shape}\")\n\n    # Attempt to load and process data (these might fail without actual AOT data)\n    if hasattr(my_biomap, 'load_data'):\n        # This method is not directly available in current __init__ or Biomap class\n        # Actual usage might involve calling processing methods after init\n        print(\"No direct 'load_data' method found as an example, proceeding with other calls.\")\n\n    # If the Biomap class has methods like 'get_biomap' or 'calculate_something'\n    if hasattr(my_biomap, 'get_biomap'):\n        print(\"Calling get_biomap (placeholder)\")\n        # result = my_biomap.get_biomap() # Uncomment with real data\n\n    print(\"Biomap object created successfully. Further methods depend on your AOT data structure.\")\n\nexcept Exception as e:\n    print(f\"An error occurred during quickstart: {e}\")\n    print(\"Please ensure your 'folder_path' contains valid AOT measurement files and 'calibration_path' points to a correct calibration file.\")\n\n# Clean up dummy files\nos.remove(os.path.join(dummy_folder_path, 'measurement_0001.txt'))\nos.remove(dummy_calibration_path)\nos.rmdir(dummy_folder_path)\n","lang":"python","description":"This quickstart demonstrates how to initialize the `Biomap` object. It highlights the critical dependency on providing valid local `folder_path` (containing raw AOT measurement files) and `calibration_path` files. The actual processing methods you call will depend on your specific AOT data and analysis goals."},"warnings":[{"fix":"Always use `from aot_biomaps import ...` or `import aot_biomaps`.","message":"The PyPI package `aot-biomaps` uses a hyphen, but Python imports require the package name to use underscores, i.e., `import aot_biomaps`.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Ensure you have actual AOT measurement data organized in a folder and a corresponding calibration file. Replace placeholder paths with your real data paths.","message":"The `Biomap` class requires valid paths to AOT data folders and a calibration file during initialization. Without these, the library cannot function, and examples will fail.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Understand that the library's utility is within the AOT domain. Ensure you have the necessary domain knowledge and data.","message":"This library is highly specialized for Acousto-Optic Tomography. Its usage and functionality are deeply tied to specific AOT hardware and data formats, making it less suitable for general-purpose image or data processing tasks.","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"last_verified":"2026-04-17T00:00:00.000Z","next_check":"2026-07-16T00:00:00.000Z","problems":[{"fix":"Use `from aot_biomaps import ...` or `import aot_biomaps`.","cause":"Attempting to import the package using a hyphen in the name instead of an underscore.","error":"ModuleNotFoundError: No module named 'aot-biomaps'"},{"fix":"Verify that `folder_path` and `calibration_path` point to actual, accessible directories and files containing your AOT data.","cause":"The `Biomap` class was initialized with an invalid or non-existent path for the data folder or calibration file.","error":"FileNotFoundError: [Errno 2] No such file or directory: 'your/data/folder'"},{"fix":"Import directly from the top-level package: `from aot_biomaps import Biomap`.","cause":"Trying to import a submodule explicitly when its contents (like `Biomap` class) are directly exposed by the package's `__init__.py`.","error":"AttributeError: module 'aot_biomaps' has no attribute 'biomap_class'"}]}