Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -163,9 +163,6 @@ cython_debug/




.vscode/

# Ignore dynaconf secret files
.secrets.*

Expand Down
59 changes: 59 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [

{
"name": "tiled_ws_cli",
"type": "debugpy",
"request": "launch",
"module": "arroyosas.app.tiled_ws_cli",
"env": {
"TILED_URI": "https://tield-dev.nsls2.bnl.gov",

},
"justMyCode": true
},
{
"name": "tiled_websocket",
"type": "debugpy",
"request": "launch",
"module": "arroyosas.tiled.tiled_websocket",
"env": {

}
},
{
"name": "lse_operator_cli",
"type": "debugpy",
"request": "launch",
"module": "arroyosas.app.lse_operator_cli"
},
{
"name": "viz_operator_cli",
"type": "debugpy",
"request": "launch",
"module": "arroyosas.app.viz_operator_cli"
},
{
"name": "frame_listener_sim",
"type": "debugpy",
"request": "launch",
"module": "arroyosas.app.frame_listener_sim_cli"
},
{
"name": "tiled_event_simulator",
"type": "debugpy",
"request": "launch",
"module": "arroyosas.app.tiled_event_sim_cli",
"args": [
"tiled_event_logs"
],
"env": {
"TILED_API_KEY": "32bf4b533d638f470270e0725d14a7bc153114641a7dfda58f96e7926160e9e126272add"
}
}
]
}
9 changes: 6 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
FROM python:3.11


# Install git for cloning the tiled repository
RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/*

WORKDIR /app


COPY . /app

RUN pip install --upgrade pip && \
pip install .[all]
RUN pip install .[all]

RUN pip install debugpy


CMD ["echo", "Hello World"]
19 changes: 0 additions & 19 deletions Dockerfile.dev

This file was deleted.

9 changes: 9 additions & 0 deletions Dockerfile_frontend_dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
FROM node:18

WORKDIR /frontend
COPY ./frontend/package*.json /frontend/
RUN npm ci
COPY ./frontend /frontend/
COPY .env_frontend /frontend/.env


17 changes: 17 additions & 0 deletions frontend/.vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Launch Program",
"skipFiles": [
"<node_internals>/**"
],
"program": "${file}"
}
]
}
3 changes: 2 additions & 1 deletion frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"react-dom": "^18.3.1",
"react-plotly.js": "^2.5.1",
"react-router": "^7.1.5",
"react-scripts": "5.0.1",
"react-scripts": "^5.0.1",
"react-tooltip": "^5.28.0",
"web-vitals": "^2.1.4"
},
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/Header.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export default function Header({isExperimentRunning=false, showStatus=false, sta
<div className="absolute top-0 right-0 mr-2 mt-2">
<p className="text-xs text-gray-300">Build:{buildNumber}</p>
</div>
<h1 className="text-4xl text-sky-900 px-8">GISAXS Data Viewer</h1>
<h1 className="text-4xl text-sky-900 px-8">SAS Data Viewer</h1>
<img src={illumine_logo} alt="illumine logo" className="h-8 w-auto"/>
<img src={ml_logo} alt="ml exchange logo" className="h-8 w-auto"/>
<img src={mwet_logo} alt="mwet logo" className="h-8 w-auto"/>
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/utils/connectionHelper.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*/
const getWsUrl = () => {
const currentWebsiteIP = window.location.hostname;
const pathname = "/viz";
const pathname = "/ws";
const port = window.location.port;
var wsUrl;

Expand Down
40 changes: 8 additions & 32 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,51 +8,28 @@ name = "arroyoSAS"
version = "0.0.1"
description = "A package to perform computations and suggestions during a time-resolved GISAXS experiment."
authors = [{ name = "Dylan McReynolds", email = "[email protected]" }]
dependencies = [
"arroyopy",
"dynaconf",
"python-dotenv",
"pandas",
"msgpack",
"numpy",
"Pillow",
"bluesky-tiled-plugins==2.0.0b57",
"pyzmq",
"tqdm",
"typer",
"websockets",
"zarr",
"pyFAI",
"transformers",
"redis"]
dependencies = []

[project.optional-dependencies]
workflow-viz = [
"joblib",
"numpy<2.0.0",
"pandas",
"plotly-express",
"pyFAI==2023.9.0",
"python-dotenv",
"pyarrow>=14.0.1",
"requests==2.26.0",
"diskcache==5.6.3",
"scikit-learn==1.3.0"]


dev = [
"fakeredis",
"flake8",
"pre-commit",
"pytest-asyncio",
"pytest-mock",
"tiled[server] >=0.1.0b14, <0.2"
]

lse = [
"torchvision==0.17.2",
"joblib"
]

viz = [

]

all = [
"arroyopy",
"bluesky",
Expand All @@ -61,20 +38,19 @@ all = [
"pandas",
"msgpack",
"numpy",
"ophyd",
"tiled[client] >=0.1.0b14, <0.2",
"Pillow",
"pyzmq",
"tqdm",
"typer",
"websockets",
"tiled[client] >=0.1.0b14, <0.2",
"redis",
"numpy<2.0.0",
"pandas",
"python-dotenv",
"pyarrow>=14.0.1",
"pyFAI==2025.03",
"aiosqlite",

]

[tool.isort]
Expand Down
17 changes: 0 additions & 17 deletions settings_container.yaml

This file was deleted.

23 changes: 23 additions & 0 deletions settings_dev.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
logging_level: INFO
redis_host: redis
resis_port: 6379

viz_operator:
listeners:
listener:
zmq_address: tcp://tiled_socket:5000 #only safe in containers

operator:
redis:
host: kvrocks
port: 6666

publishers:
websockets:
host: 0.0.0.0
port: 8021
tiled:
raw:
uri: https://tiled-dev.nsls2.bnl.gov
api_key: "@format {env[TILED_API_KEY]}"
7 changes: 4 additions & 3 deletions src/arroyosas/app/frame_listener_sim_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
onto ZMQ, taking care of pydantic messages, serialization and msgpack
"""

FRAME_WIDTH = 1475
FRAME_WIDTH = 475
FRAME_HEIGHT = 619
DATA_TYPE = "float32"
DATA_TYPE = "uint8"

app = typer.Typer()

Expand Down Expand Up @@ -59,6 +59,7 @@ async def process_images(
)
print("event")
await socket.send(msgpack.packb(event.model_dump()))
await asyncio.sleep(0.5)
stop = SASStop(num_frames=frames)
print("stop")
await socket.send(msgpack.packb(stop.model_dump()))
Expand All @@ -76,7 +77,7 @@ async def run():
print(f"Cycles: {cycles}, Frames: {frames}, Pause: {pause}")
context = zmq.asyncio.Context()
socket = context.socket(zmq.PUB)
address = settings.tiled_poller.zmq_frame_publisher.address
address = settings.frame_listener_sim.zmq_frame_publisher.address
print(f"Connecting to {address}")
socket.bind(address)
await process_images(socket, cycles, frames, pause)
Expand Down
40 changes: 0 additions & 40 deletions src/arroyosas/app/lse_operator_cli.py

This file was deleted.

2 changes: 1 addition & 1 deletion src/arroyosas/app/tiled_event_sim_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ def main(
log_dir: str = typer.Argument(..., help="Directory containing Tiled event logs"),
host: str = typer.Option("0.0.0.0", help="Host to bind the WebSocket server to"),
port: int = typer.Option(8000, help="Port to bind the WebSocket server to"),
stream_path: str = typer.Option("/stream", help="WebSocket path for the stream endpoint"),
stream_path: str = typer.Option("/", help="WebSocket path for the stream endpoint"),
run_id: str = typer.Option(None, help="Specific run ID to replay (defaults to first run found)")
):
"""
Expand Down
Loading
Loading