haniwers


Namehaniwers JSON
Version 0.23.1 PyPI version JSON
download
home_pagehttps://qumasan.gitlab.io/haniwers/docs/
SummaryAnalysis tool for TanQ/FunQ project
upload_time2025-08-25 04:57:17
maintainerNone
docs_urlNone
authorShota Takahashi (KMI)
requires_python>=3.10
licenseMIT
keywords muon
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            

![GitLab Tag](https://img.shields.io/gitlab/v/tag/qumasan%2Fhaniwers?sort=semver&style=for-the-badge) ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/haniwers?style=for-the-badge) ![GitLab License](https://img.shields.io/gitlab/license/qumasan%2Fhaniwers?style=for-the-badge)
![PyPI - Downloads](https://img.shields.io/pypi/dd/haniwers?style=for-the-badge) ![PyPI -Downloads](https://img.shields.io/pypi/dw/haniwers?style=for-the-badge) ![PyPI - Downloads](https://img.shields.io/pypi/dm/haniwers?style=for-the-badge)
![Gitlab Pipeline Status](https://img.shields.io/gitlab/pipeline-status/qumasan%2Fhaniwers?style=for-the-badge) ![GitLab Last Commit](https://img.shields.io/gitlab/last-commit/qumasan%2Fhaniwers?style=for-the-badge)

---

# Haniwers : ハニワーズ

墳Qの解析コード(個人用)

![w:300](./docs/_static/haniwer.png)

# クイックスタート

- PyPiで公開しているパッケージをインストールしてください
  - https://pypi.org/project/haniwers/
- `pipx`でインストールします(`pip3`よりオススメ)

```console
$ pipx install haniwers
```

- バージョンを指定する場合は`haniwers==バージョン番号`としてください
- 有効なバージョン番号は[リリース履歴](https://pypi.org/project/haniwers/#history)で確認できます

```console
$ pipx install haniwers==0.19.3
```

- パスを確認してください

```console
$ which haniwers
~/.local/bin/haniwers
```

- `haniwers --help`でサブコマンドを確認してください

```console
$ haniwers --help

 Usage: haniwers [OPTIONS] COMMAND [ARGS]...

╭─ Commands ───────────────────────────────────────────────
│ version    Show haniwers version.
│ docs       Open online document.
│ ports      Search available ports and show device names.
│ scan       スレッショルド測定
│ fit        スレッショルド計算
│ vth        スレッショルド設定
│ daq        Start DAQ. Set up with daq.toml.
│ raw2tmp    Parse raw_data into CSV format. Should be used temporarily for quick analysis.
│ run2csv    Parse raw_data into CSV format. Specify RunID.
│ mock-daq   Dummy DAQ
╰──────────────────────────────────────────────────────────
```

- パッケージを最新版に更新できます

```console
$ pipx upgrade haniwers
```

---

# セットアップ

## 作業ディレクトリを作成

- データを取得するディレクトリを作成してください。
- 以後、このディレクトリをデータ取得するときのルートディレクトリとします。

```console
$ mkdir ~/repos/hnw-daq/
```

## 設定ファイルを作成

[haniwers/examples](https://gitlab.com/qumasan/haniwers/-/tree/main/examples)にある設定ファイルをダウンロードして、
作業ディレクトリに配置してください。
(とてもめんどくさくてすみません。そのうちデフォルト設定を自動で生成できるようにしようと思います)

---

# ドキュメント

関連ドキュメントはGitLab Pagesで公開しています。

- ``haniwers``の使い方(built with sphinx): https://qumasan.gitlab.io/haniwers/docs/
- 解析ログブック(built with mystmd): https://qumasan.gitlab.io/haniwers/

それぞれのコマンドの使い方は``haniwers docs``でオンラインヘルプを確認できます。

```console
$ haniwers docs
$ haniwers docs --page version
$ haniwers docs --page scan
$ haniwers docs --page fit
$ haniwers docs --page vth
$ haniwers docs --page daq
$ haniwers docs --page raw2tmp
$ haniwers docs --page run2csv
```

---

# できること/したいこと

- [x] 宇宙線検出器OSECHIで取得したデータを、解析可能なCSVファイルに変換する
- [ ] データを理解するのに必要は基本プロットを作成する
- [ ] まとめスライドのテンプレートを作成する

---

![w:300](./docs/_static/osechi/IMG_1551.jpeg)

> 以下はあまり整理できてない

# 開発者向け

- `haniwers`のリポジトリはDAQツールと解析ツールが同梱されています
- ツールの開発環境は`Docker`で構築できます
- 測定環境と解析環境は作業ディレクトリを分けて、別々にクローンことを推奨します

## 環境構築(with docker)

- Docker環境(DockerもしくはDocker Desktop)がある場合、`docker compose`で開発環境を構築できます
- 慣れる簡単(&移植性が高い)ので、こちらの手法をオススメします。

```bash
$ git clone https://gitlab.com/qumasan/haniwers.git
$ cd haniwers
```

- `docker compose build base`でベースとなるカスタムイメージ(`haniwers:latest`)を作成します

```bash
$ docker compose build base
[+] Building 1/1
 ✔ base  Built
```

- `docker compose run --rm サービス名 コマンド`で用途別のコマンドを実行できます

```bash
$ docker compose run --rm cli
Creating virtualenv haniwers-xS3fZVNL-py3.11 in /root/.cache/pypoetry/virtualenvs

 Usage: haniwers [OPTIONS] COMMAND [ARGS]...

╭─ Commands ───────────────────────────────────
│ version    Show haniwers version.
│ docs       Open online document.
│ ports      Search available ports and show device names.
│ scan       スレッショルド測定
│ fit        スレッショルド計算
│ vth        スレッショルド設定
│ daq        Start DAQ. Set up with daq.toml.
│ raw2tmp    Parse raw_data into CSV format. Should be used temporarily for quick analysis.
│ run2csv    Parse raw_data into CSV format. Specify RunID.
│ mock-daq   Dummy DAQ
```

## 環境構築(with poetry)

```bash
$ git clone https://gitlab.com/qumasan/haniwers.git
$ cd haniwers
```

```bash
$ pipx install poetry
$ poetry install
$ poetry run haniwers --help
```

## 環境構築(with uv)

- Experimental
- そのうち`poetry`かんりから`uv`管理に完全移行する予定です

```bash
$ pipx install uv
$ uv tool install poetry
$ uvx poetry run haniwers --help
```

---

### 作業ディレクトリを作成する

```console
// 作業環境を作成する(ディレクトリ名は任意)
$ cd mkdir ~/repos/hnw/

// 測定に使う環境(ディレクトリ)
$ mkdir hnw-daq

// 解析に使う環境(ディレクトリ)
$ mkdir hnw-analysis
```

- 測定環境:タグを指定してリポジトリをクローンする
- 解析環境:最先端のブランチ(``main``)をクローンし、解析トピックごとにブランチを作成する

### 測定に使う環境を構築する

```console
$ cd ~/repos/hnw/hnw-daq/
// タグを指定してクローンする
$ git clone https://gitlab.com/qumasan/haniwers.git -b 0.13.1 --depth 1
$ cd haniwers
$ poetry install
$ poetry shell
(.venv) $ cd sandbox/
(.venv) $ haniwers --help
```

- データ測定環境を構築する場合は、``-b タグ番号``でタグを指定してshallowクローン(``--depth 1``)する
  - 最新のタグ番号は[タグ一覧](https://gitlab.com/qumasan/haniwers/-/tags)で調べる
  - それぞれのタグの内容は[変更履歴(CHANGELOG)](https://gitlab.com/qumasan/haniwers/-/blob/main/CHANGELOG.md)を調べる
- データ測定中に不意にソースコードが更新されないようにする必要がある
  - 測定中にソースコードを更新してしまった場合、どのような動作になるかは分からない
  - 取得したデータの健全性を確保するため、意図しない更新はできるだけ避けるようにする

### 解析に使う環境を構築する

```console
$ cd ~/repos/hnw/hnw-analysis/
$ git clone https://gitlab.com/qumasan/haniwers.git
$ cd haniwers
$ poetry install
$ poetry shell
(.venv) $ git switch ブランチ名
(.venv) $ cd sandbox/
(.venv) $ haniwers --help
```

---

# 事前準備

## 必要な開発環境

1. [Gitのインストール](https://kumaroot.readthedocs.io/ja/latest/git/git-install.html)
2. [Pythonのインストール](https://kumaroot.readthedocs.io/ja/latest/python/python-install.html)
3. [Poetryのインストール](https://kumaroot.readthedocs.io/ja/latest/python/python-poetry.html)
4. [VS Codeのインストール](https://kumaroot.readthedocs.io/ja/latest/vscode/vscode-install.html)

## Gitの設定

```console
// 現在の設定内容を確認する
$ git config -l

// 基本項目が設定されてない場合
$ git config --global user.name "名前"
$ git config --global user.email "メールアドレス"
$ git config --global pull.rebase false

// エディターを設定したい場合(どれかひとつ)
$ git config --global core.editor emacsclient    # Emacsに設定
$ git config --global core.editor "code --wait"  # VS Codeに設定
$ git config --global core.editor hx             # Helixに設定
```

- Gitをはじめて使う場合、ユーザー名/メールアドレスの基本設定が必要
- 必要であればエディターを設定する(これは後回しでもOK)

## Python環境 /Poetry環境を構築する

```console
$ poetry install
$ poetry shell
(.venv) $ cd sandbox
(.venv) $ haniwers --help
(.venv) $ haniwers version
haniwers 0.12.0
```

---

# ポータブル環境を作成する

Dockerを使ってポータブルな環境(Dockerイメージ)を作成する

## イメージを作成する

```console
$ cd docker
$ docker build --platform=linux/arm64 -t myhaniwers .
```

- Raspberry Piで動作するイメージを作る場合は、``ARM``ベース(``--platform=linux/arm64``)でビルドする
- MacBookなどRPi以外のパソコンでビルドする
  - RPiでイメージをビルドすると、かなり時間がかかる

## イメージを移動する

```console
// MBPで実行する
$ docker save myhaniwers:latest > myhaniwers.tar

// RPiで実行する
$ docker load -i myhaniwers.tar
```

- 作成したイメージを``.tar``形式に出力し、USBメモリにコピーする
- USBメモリから測定用のRPiにイメージをコピーする
- RPiでイメージを読み込む

## コンテナを起動する

```console
$ docker run --rm -it \
    -v $PWD/sandbox:/home/app/haniwers/sandbox \
    --device=/dev/ttyUSB0:/dev/ttyUSB0 \
    myhaniwers:latest bash
```

- ホスト側の``sandbox``をコンテナ側にマウントする
- ホスト側のUSBポート(``/dev/ttyUSB0``)をコンテナ側のUSBポート(``/dev/ttyUSB0``)に接続する

            

Raw data

            {
    "_id": null,
    "home_page": "https://qumasan.gitlab.io/haniwers/docs/",
    "name": "haniwers",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": null,
    "keywords": "muon",
    "author": "Shota Takahashi (KMI)",
    "author_email": "shotakaha@kmi.nagoya-u.ac.jp",
    "download_url": "https://files.pythonhosted.org/packages/db/e9/f7be2ab8d1fe2df810ee4f4f9c22e2a03efa529672e1fc06cd58bdd6f34b/haniwers-0.23.1.tar.gz",
    "platform": null,
    "description": "\n\n![GitLab Tag](https://img.shields.io/gitlab/v/tag/qumasan%2Fhaniwers?sort=semver&style=for-the-badge) ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/haniwers?style=for-the-badge) ![GitLab License](https://img.shields.io/gitlab/license/qumasan%2Fhaniwers?style=for-the-badge)\n![PyPI - Downloads](https://img.shields.io/pypi/dd/haniwers?style=for-the-badge) ![PyPI -Downloads](https://img.shields.io/pypi/dw/haniwers?style=for-the-badge) ![PyPI - Downloads](https://img.shields.io/pypi/dm/haniwers?style=for-the-badge)\n![Gitlab Pipeline Status](https://img.shields.io/gitlab/pipeline-status/qumasan%2Fhaniwers?style=for-the-badge) ![GitLab Last Commit](https://img.shields.io/gitlab/last-commit/qumasan%2Fhaniwers?style=for-the-badge)\n\n---\n\n# Haniwers : \u30cf\u30cb\u30ef\u30fc\u30ba\n\n\u58b3Q\u306e\u89e3\u6790\u30b3\u30fc\u30c9\uff08\u500b\u4eba\u7528\uff09\n\n![w:300](./docs/_static/haniwer.png)\n\n# \u30af\u30a4\u30c3\u30af\u30b9\u30bf\u30fc\u30c8\n\n- PyPi\u3067\u516c\u958b\u3057\u3066\u3044\u308b\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u304f\u3060\u3055\u3044\n  - https://pypi.org/project/haniwers/\n- `pipx`\u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\uff08`pip3`\u3088\u308a\u30aa\u30b9\u30b9\u30e1\uff09\n\n```console\n$ pipx install haniwers\n```\n\n- \u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u6307\u5b9a\u3059\u308b\u5834\u5408\u306f`haniwers==\u30d0\u30fc\u30b8\u30e7\u30f3\u756a\u53f7`\u3068\u3057\u3066\u304f\u3060\u3055\u3044\n- \u6709\u52b9\u306a\u30d0\u30fc\u30b8\u30e7\u30f3\u756a\u53f7\u306f[\u30ea\u30ea\u30fc\u30b9\u5c65\u6b74](https://pypi.org/project/haniwers/#history)\u3067\u78ba\u8a8d\u3067\u304d\u307e\u3059\n\n```console\n$ pipx install haniwers==0.19.3\n```\n\n- \u30d1\u30b9\u3092\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044\n\n```console\n$ which haniwers\n~/.local/bin/haniwers\n```\n\n- `haniwers --help`\u3067\u30b5\u30d6\u30b3\u30de\u30f3\u30c9\u3092\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044\n\n```console\n$ haniwers --help\n\n Usage: haniwers [OPTIONS] COMMAND [ARGS]...\n\n\u256d\u2500 Commands \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\u2502 version    Show haniwers version.\n\u2502 docs       Open online document.\n\u2502 ports      Search available ports and show device names.\n\u2502 scan       \u30b9\u30ec\u30c3\u30b7\u30e7\u30eb\u30c9\u6e2c\u5b9a\n\u2502 fit        \u30b9\u30ec\u30c3\u30b7\u30e7\u30eb\u30c9\u8a08\u7b97\n\u2502 vth        \u30b9\u30ec\u30c3\u30b7\u30e7\u30eb\u30c9\u8a2d\u5b9a\n\u2502 daq        Start DAQ. Set up with daq.toml.\n\u2502 raw2tmp    Parse raw_data into CSV format. Should be used temporarily for quick analysis.\n\u2502 run2csv    Parse raw_data into CSV format. Specify RunID.\n\u2502 mock-daq   Dummy DAQ\n\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n```\n\n- \u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u6700\u65b0\u7248\u306b\u66f4\u65b0\u3067\u304d\u307e\u3059\n\n```console\n$ pipx upgrade haniwers\n```\n\n---\n\n# \u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\n\n## \u4f5c\u696d\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3092\u4f5c\u6210\n\n- \u30c7\u30fc\u30bf\u3092\u53d6\u5f97\u3059\u308b\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3092\u4f5c\u6210\u3057\u3066\u304f\u3060\u3055\u3044\u3002\n- \u4ee5\u5f8c\u3001\u3053\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3092\u30c7\u30fc\u30bf\u53d6\u5f97\u3059\u308b\u3068\u304d\u306e\u30eb\u30fc\u30c8\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3068\u3057\u307e\u3059\u3002\n\n```console\n$ mkdir ~/repos/hnw-daq/\n```\n\n## \u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\n\n[haniwers/examples](https://gitlab.com/qumasan/haniwers/-/tree/main/examples)\u306b\u3042\u308b\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u3066\u3001\n\u4f5c\u696d\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u914d\u7f6e\u3057\u3066\u304f\u3060\u3055\u3044\u3002\n\uff08\u3068\u3066\u3082\u3081\u3093\u3069\u304f\u3055\u304f\u3066\u3059\u307f\u307e\u305b\u3093\u3002\u305d\u306e\u3046\u3061\u30c7\u30d5\u30a9\u30eb\u30c8\u8a2d\u5b9a\u3092\u81ea\u52d5\u3067\u751f\u6210\u3067\u304d\u308b\u3088\u3046\u306b\u3057\u3088\u3046\u3068\u601d\u3044\u307e\u3059\uff09\n\n---\n\n# \u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\n\n\u95a2\u9023\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u306fGitLab Pages\u3067\u516c\u958b\u3057\u3066\u3044\u307e\u3059\u3002\n\n- ``haniwers``\u306e\u4f7f\u3044\u65b9\uff08built with sphinx\uff09: https://qumasan.gitlab.io/haniwers/docs/\n- \u89e3\u6790\u30ed\u30b0\u30d6\u30c3\u30af\uff08built with mystmd\uff09: https://qumasan.gitlab.io/haniwers/\n\n\u305d\u308c\u305e\u308c\u306e\u30b3\u30de\u30f3\u30c9\u306e\u4f7f\u3044\u65b9\u306f``haniwers docs``\u3067\u30aa\u30f3\u30e9\u30a4\u30f3\u30d8\u30eb\u30d7\u3092\u78ba\u8a8d\u3067\u304d\u307e\u3059\u3002\n\n```console\n$ haniwers docs\n$ haniwers docs --page version\n$ haniwers docs --page scan\n$ haniwers docs --page fit\n$ haniwers docs --page vth\n$ haniwers docs --page daq\n$ haniwers docs --page raw2tmp\n$ haniwers docs --page run2csv\n```\n\n---\n\n# \u3067\u304d\u308b\u3053\u3068\uff0f\u3057\u305f\u3044\u3053\u3068\n\n- [x] \u5b87\u5b99\u7dda\u691c\u51fa\u5668OSECHI\u3067\u53d6\u5f97\u3057\u305f\u30c7\u30fc\u30bf\u3092\u3001\u89e3\u6790\u53ef\u80fd\u306aCSV\u30d5\u30a1\u30a4\u30eb\u306b\u5909\u63db\u3059\u308b\n- [ ] \u30c7\u30fc\u30bf\u3092\u7406\u89e3\u3059\u308b\u306e\u306b\u5fc5\u8981\u306f\u57fa\u672c\u30d7\u30ed\u30c3\u30c8\u3092\u4f5c\u6210\u3059\u308b\n- [ ] \u307e\u3068\u3081\u30b9\u30e9\u30a4\u30c9\u306e\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u3092\u4f5c\u6210\u3059\u308b\n\n---\n\n![w:300](./docs/_static/osechi/IMG_1551.jpeg)\n\n> \u4ee5\u4e0b\u306f\u3042\u307e\u308a\u6574\u7406\u3067\u304d\u3066\u306a\u3044\n\n# \u958b\u767a\u8005\u5411\u3051\n\n- `haniwers`\u306e\u30ea\u30dd\u30b8\u30c8\u30ea\u306fDAQ\u30c4\u30fc\u30eb\u3068\u89e3\u6790\u30c4\u30fc\u30eb\u304c\u540c\u68b1\u3055\u308c\u3066\u3044\u307e\u3059\n- \u30c4\u30fc\u30eb\u306e\u958b\u767a\u74b0\u5883\u306f`Docker`\u3067\u69cb\u7bc9\u3067\u304d\u307e\u3059\n- \u6e2c\u5b9a\u74b0\u5883\u3068\u89e3\u6790\u74b0\u5883\u306f\u4f5c\u696d\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3092\u5206\u3051\u3066\u3001\u5225\u3005\u306b\u30af\u30ed\u30fc\u30f3\u3053\u3068\u3092\u63a8\u5968\u3057\u307e\u3059\n\n## \u74b0\u5883\u69cb\u7bc9\uff08with docker\uff09\n\n- Docker\u74b0\u5883\uff08Docker\u3082\u3057\u304f\u306fDocker Desktop\uff09\u304c\u3042\u308b\u5834\u5408\u3001`docker compose`\u3067\u958b\u767a\u74b0\u5883\u3092\u69cb\u7bc9\u3067\u304d\u307e\u3059\n- \u6163\u308c\u308b\u7c21\u5358\uff08\uff06\u79fb\u690d\u6027\u304c\u9ad8\u3044\uff09\u306e\u3067\u3001\u3053\u3061\u3089\u306e\u624b\u6cd5\u3092\u30aa\u30b9\u30b9\u30e1\u3057\u307e\u3059\u3002\n\n```bash\n$ git clone https://gitlab.com/qumasan/haniwers.git\n$ cd haniwers\n```\n\n- `docker compose build base`\u3067\u30d9\u30fc\u30b9\u3068\u306a\u308b\u30ab\u30b9\u30bf\u30e0\u30a4\u30e1\u30fc\u30b8\uff08`haniwers:latest`\uff09\u3092\u4f5c\u6210\u3057\u307e\u3059\n\n```bash\n$ docker compose build base\n[+] Building 1/1\n \u2714 base  Built\n```\n\n- `docker compose run --rm \u30b5\u30fc\u30d3\u30b9\u540d \u30b3\u30de\u30f3\u30c9`\u3067\u7528\u9014\u5225\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3067\u304d\u307e\u3059\n\n```bash\n$ docker compose run --rm cli\nCreating virtualenv haniwers-xS3fZVNL-py3.11 in /root/.cache/pypoetry/virtualenvs\n\n Usage: haniwers [OPTIONS] COMMAND [ARGS]...\n\n\u256d\u2500 Commands \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\u2502 version    Show haniwers version.\n\u2502 docs       Open online document.\n\u2502 ports      Search available ports and show device names.\n\u2502 scan       \u30b9\u30ec\u30c3\u30b7\u30e7\u30eb\u30c9\u6e2c\u5b9a\n\u2502 fit        \u30b9\u30ec\u30c3\u30b7\u30e7\u30eb\u30c9\u8a08\u7b97\n\u2502 vth        \u30b9\u30ec\u30c3\u30b7\u30e7\u30eb\u30c9\u8a2d\u5b9a\n\u2502 daq        Start DAQ. Set up with daq.toml.\n\u2502 raw2tmp    Parse raw_data into CSV format. Should be used temporarily for quick analysis.\n\u2502 run2csv    Parse raw_data into CSV format. Specify RunID.\n\u2502 mock-daq   Dummy DAQ\n```\n\n## \u74b0\u5883\u69cb\u7bc9\uff08with poetry\uff09\n\n```bash\n$ git clone https://gitlab.com/qumasan/haniwers.git\n$ cd haniwers\n```\n\n```bash\n$ pipx install poetry\n$ poetry install\n$ poetry run haniwers --help\n```\n\n## \u74b0\u5883\u69cb\u7bc9\uff08with uv\uff09\n\n- Experimental\n- \u305d\u306e\u3046\u3061`poetry`\u304b\u3093\u308a\u304b\u3089`uv`\u7ba1\u7406\u306b\u5b8c\u5168\u79fb\u884c\u3059\u308b\u4e88\u5b9a\u3067\u3059\n\n```bash\n$ pipx install uv\n$ uv tool install poetry\n$ uvx poetry run haniwers --help\n```\n\n---\n\n### \u4f5c\u696d\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3092\u4f5c\u6210\u3059\u308b\n\n```console\n// \u4f5c\u696d\u74b0\u5883\u3092\u4f5c\u6210\u3059\u308b\uff08\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u540d\u306f\u4efb\u610f\uff09\n$ cd mkdir ~/repos/hnw/\n\n// \u6e2c\u5b9a\u306b\u4f7f\u3046\u74b0\u5883\uff08\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\uff09\n$ mkdir hnw-daq\n\n// \u89e3\u6790\u306b\u4f7f\u3046\u74b0\u5883\uff08\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\uff09\n$ mkdir hnw-analysis\n```\n\n- \u6e2c\u5b9a\u74b0\u5883\uff1a\u30bf\u30b0\u3092\u6307\u5b9a\u3057\u3066\u30ea\u30dd\u30b8\u30c8\u30ea\u3092\u30af\u30ed\u30fc\u30f3\u3059\u308b\n- \u89e3\u6790\u74b0\u5883\uff1a\u6700\u5148\u7aef\u306e\u30d6\u30e9\u30f3\u30c1\uff08``main``\uff09\u3092\u30af\u30ed\u30fc\u30f3\u3057\u3001\u89e3\u6790\u30c8\u30d4\u30c3\u30af\u3054\u3068\u306b\u30d6\u30e9\u30f3\u30c1\u3092\u4f5c\u6210\u3059\u308b\n\n### \u6e2c\u5b9a\u306b\u4f7f\u3046\u74b0\u5883\u3092\u69cb\u7bc9\u3059\u308b\n\n```console\n$ cd ~/repos/hnw/hnw-daq/\n// \u30bf\u30b0\u3092\u6307\u5b9a\u3057\u3066\u30af\u30ed\u30fc\u30f3\u3059\u308b\n$ git clone https://gitlab.com/qumasan/haniwers.git -b 0.13.1 --depth 1\n$ cd haniwers\n$ poetry install\n$ poetry shell\n(.venv) $ cd sandbox/\n(.venv) $ haniwers --help\n```\n\n- \u30c7\u30fc\u30bf\u6e2c\u5b9a\u74b0\u5883\u3092\u69cb\u7bc9\u3059\u308b\u5834\u5408\u306f\u3001``-b \u30bf\u30b0\u756a\u53f7``\u3067\u30bf\u30b0\u3092\u6307\u5b9a\u3057\u3066shallow\u30af\u30ed\u30fc\u30f3\uff08``--depth 1``\uff09\u3059\u308b\n  - \u6700\u65b0\u306e\u30bf\u30b0\u756a\u53f7\u306f[\u30bf\u30b0\u4e00\u89a7](https://gitlab.com/qumasan/haniwers/-/tags)\u3067\u8abf\u3079\u308b\n  - \u305d\u308c\u305e\u308c\u306e\u30bf\u30b0\u306e\u5185\u5bb9\u306f[\u5909\u66f4\u5c65\u6b74\uff08CHANGELOG\uff09](https://gitlab.com/qumasan/haniwers/-/blob/main/CHANGELOG.md)\u3092\u8abf\u3079\u308b\n- \u30c7\u30fc\u30bf\u6e2c\u5b9a\u4e2d\u306b\u4e0d\u610f\u306b\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u304c\u66f4\u65b0\u3055\u308c\u306a\u3044\u3088\u3046\u306b\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\n  - \u6e2c\u5b9a\u4e2d\u306b\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u3092\u66f4\u65b0\u3057\u3066\u3057\u307e\u3063\u305f\u5834\u5408\u3001\u3069\u306e\u3088\u3046\u306a\u52d5\u4f5c\u306b\u306a\u308b\u304b\u306f\u5206\u304b\u3089\u306a\u3044\n  - \u53d6\u5f97\u3057\u305f\u30c7\u30fc\u30bf\u306e\u5065\u5168\u6027\u3092\u78ba\u4fdd\u3059\u308b\u305f\u3081\u3001\u610f\u56f3\u3057\u306a\u3044\u66f4\u65b0\u306f\u3067\u304d\u308b\u3060\u3051\u907f\u3051\u308b\u3088\u3046\u306b\u3059\u308b\n\n### \u89e3\u6790\u306b\u4f7f\u3046\u74b0\u5883\u3092\u69cb\u7bc9\u3059\u308b\n\n```console\n$ cd ~/repos/hnw/hnw-analysis/\n$ git clone https://gitlab.com/qumasan/haniwers.git\n$ cd haniwers\n$ poetry install\n$ poetry shell\n(.venv) $ git switch \u30d6\u30e9\u30f3\u30c1\u540d\n(.venv) $ cd sandbox/\n(.venv) $ haniwers --help\n```\n\n---\n\n# \u4e8b\u524d\u6e96\u5099\n\n## \u5fc5\u8981\u306a\u958b\u767a\u74b0\u5883\n\n1. [Git\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb](https://kumaroot.readthedocs.io/ja/latest/git/git-install.html)\n2. [Python\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb](https://kumaroot.readthedocs.io/ja/latest/python/python-install.html)\n3. [Poetry\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb](https://kumaroot.readthedocs.io/ja/latest/python/python-poetry.html)\n4. [VS Code\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb](https://kumaroot.readthedocs.io/ja/latest/vscode/vscode-install.html)\n\n## Git\u306e\u8a2d\u5b9a\n\n```console\n// \u73fe\u5728\u306e\u8a2d\u5b9a\u5185\u5bb9\u3092\u78ba\u8a8d\u3059\u308b\n$ git config -l\n\n// \u57fa\u672c\u9805\u76ee\u304c\u8a2d\u5b9a\u3055\u308c\u3066\u306a\u3044\u5834\u5408\n$ git config --global user.name \"\u540d\u524d\"\n$ git config --global user.email \"\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\"\n$ git config --global pull.rebase false\n\n// \u30a8\u30c7\u30a3\u30bf\u30fc\u3092\u8a2d\u5b9a\u3057\u305f\u3044\u5834\u5408\uff08\u3069\u308c\u304b\u3072\u3068\u3064\uff09\n$ git config --global core.editor emacsclient    # Emacs\u306b\u8a2d\u5b9a\n$ git config --global core.editor \"code --wait\"  # VS Code\u306b\u8a2d\u5b9a\n$ git config --global core.editor hx             # Helix\u306b\u8a2d\u5b9a\n```\n\n- Git\u3092\u306f\u3058\u3081\u3066\u4f7f\u3046\u5834\u5408\u3001\u30e6\u30fc\u30b6\u30fc\u540d\uff0f\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u306e\u57fa\u672c\u8a2d\u5b9a\u304c\u5fc5\u8981\n- \u5fc5\u8981\u3067\u3042\u308c\u3070\u30a8\u30c7\u30a3\u30bf\u30fc\u3092\u8a2d\u5b9a\u3059\u308b\uff08\u3053\u308c\u306f\u5f8c\u56de\u3057\u3067\u3082OK\uff09\n\n## Python\u74b0\u5883 /Poetry\u74b0\u5883\u3092\u69cb\u7bc9\u3059\u308b\n\n```console\n$ poetry install\n$ poetry shell\n(.venv) $ cd sandbox\n(.venv) $ haniwers --help\n(.venv) $ haniwers version\nhaniwers 0.12.0\n```\n\n---\n\n# \u30dd\u30fc\u30bf\u30d6\u30eb\u74b0\u5883\u3092\u4f5c\u6210\u3059\u308b\n\nDocker\u3092\u4f7f\u3063\u3066\u30dd\u30fc\u30bf\u30d6\u30eb\u306a\u74b0\u5883\uff08Docker\u30a4\u30e1\u30fc\u30b8\uff09\u3092\u4f5c\u6210\u3059\u308b\n\n## \u30a4\u30e1\u30fc\u30b8\u3092\u4f5c\u6210\u3059\u308b\n\n```console\n$ cd docker\n$ docker build --platform=linux/arm64 -t myhaniwers .\n```\n\n- Raspberry Pi\u3067\u52d5\u4f5c\u3059\u308b\u30a4\u30e1\u30fc\u30b8\u3092\u4f5c\u308b\u5834\u5408\u306f\u3001``ARM``\u30d9\u30fc\u30b9\uff08``--platform=linux/arm64``\uff09\u3067\u30d3\u30eb\u30c9\u3059\u308b\n- MacBook\u306a\u3069RPi\u4ee5\u5916\u306e\u30d1\u30bd\u30b3\u30f3\u3067\u30d3\u30eb\u30c9\u3059\u308b\n  - RPi\u3067\u30a4\u30e1\u30fc\u30b8\u3092\u30d3\u30eb\u30c9\u3059\u308b\u3068\u3001\u304b\u306a\u308a\u6642\u9593\u304c\u304b\u304b\u308b\n\n## \u30a4\u30e1\u30fc\u30b8\u3092\u79fb\u52d5\u3059\u308b\n\n```console\n// MBP\u3067\u5b9f\u884c\u3059\u308b\n$ docker save myhaniwers:latest > myhaniwers.tar\n\n// RPi\u3067\u5b9f\u884c\u3059\u308b\n$ docker load -i myhaniwers.tar\n```\n\n- \u4f5c\u6210\u3057\u305f\u30a4\u30e1\u30fc\u30b8\u3092``.tar``\u5f62\u5f0f\u306b\u51fa\u529b\u3057\u3001USB\u30e1\u30e2\u30ea\u306b\u30b3\u30d4\u30fc\u3059\u308b\n- USB\u30e1\u30e2\u30ea\u304b\u3089\u6e2c\u5b9a\u7528\u306eRPi\u306b\u30a4\u30e1\u30fc\u30b8\u3092\u30b3\u30d4\u30fc\u3059\u308b\n- RPi\u3067\u30a4\u30e1\u30fc\u30b8\u3092\u8aad\u307f\u8fbc\u3080\n\n## \u30b3\u30f3\u30c6\u30ca\u3092\u8d77\u52d5\u3059\u308b\n\n```console\n$ docker run --rm -it \\\n    -v $PWD/sandbox:/home/app/haniwers/sandbox \\\n    --device=/dev/ttyUSB0:/dev/ttyUSB0 \\\n    myhaniwers:latest bash\n```\n\n- \u30db\u30b9\u30c8\u5074\u306e``sandbox``\u3092\u30b3\u30f3\u30c6\u30ca\u5074\u306b\u30de\u30a6\u30f3\u30c8\u3059\u308b\n- \u30db\u30b9\u30c8\u5074\u306eUSB\u30dd\u30fc\u30c8\uff08``/dev/ttyUSB0``\uff09\u3092\u30b3\u30f3\u30c6\u30ca\u5074\u306eUSB\u30dd\u30fc\u30c8\uff08``/dev/ttyUSB0``\uff09\u306b\u63a5\u7d9a\u3059\u308b\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Analysis tool for TanQ/FunQ project",
    "version": "0.23.1",
    "project_urls": {
        "Homepage": "https://qumasan.gitlab.io/haniwers/docs/",
        "Repository": "https://gitlab.com/qumasan/haniwers/"
    },
    "split_keywords": [
        "muon"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c853942a56048c588b404710690fdc71465b72d611c437c99e93fe5e14932437",
                "md5": "def27251ca2611ff4d90e98b4755cc12",
                "sha256": "e2751c3a648de5ca48e6adb15e44604bce31685eeee405083036a0a932e4e367"
            },
            "downloads": -1,
            "filename": "haniwers-0.23.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "def27251ca2611ff4d90e98b4755cc12",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 42891,
            "upload_time": "2025-08-25T04:57:16",
            "upload_time_iso_8601": "2025-08-25T04:57:16.292081Z",
            "url": "https://files.pythonhosted.org/packages/c8/53/942a56048c588b404710690fdc71465b72d611c437c99e93fe5e14932437/haniwers-0.23.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "dbe9f7be2ab8d1fe2df810ee4f4f9c22e2a03efa529672e1fc06cd58bdd6f34b",
                "md5": "8b293b635343a8f940aeb6f223352f98",
                "sha256": "78c99e0efb97d88d585c126f13f00c5c956efba6bf1f6376ffc81791d6071299"
            },
            "downloads": -1,
            "filename": "haniwers-0.23.1.tar.gz",
            "has_sig": false,
            "md5_digest": "8b293b635343a8f940aeb6f223352f98",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 40610,
            "upload_time": "2025-08-25T04:57:17",
            "upload_time_iso_8601": "2025-08-25T04:57:17.889633Z",
            "url": "https://files.pythonhosted.org/packages/db/e9/f7be2ab8d1fe2df810ee4f4f9c22e2a03efa529672e1fc06cd58bdd6f34b/haniwers-0.23.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-08-25 04:57:17",
    "github": false,
    "gitlab": true,
    "bitbucket": false,
    "codeberg": false,
    "gitlab_user": "qumasan",
    "gitlab_project": "haniwers",
    "lcname": "haniwers"
}
        
Elapsed time: 1.90034s