Colorize arrows

main
Jeff Moe 2022-08-14 15:28:30 -06:00
parent 558cb2fca6
commit 6619fc36ce
1 changed files with 51 additions and 47 deletions

98
SNOPO
View File

@ -22,6 +22,10 @@
import graphviz
good_color="green"
ok_color="yellow"
bad_color="red"
g = graphviz.Digraph(
name="SatNOGS Optical",
comment="Process Graph",
@ -53,10 +57,10 @@ with g.subgraph(name="cluster_hardware") as a:
b.node("n_cv", label="OpenCV")
b.node("n_pi", label="Raspberry Pi")
b.node("n_asi", label="ZWO ASI")
b.edge("n_uvc", "n_video")
b.edge("n_cv", "n_video")
b.edge("n_pi", "n_video")
b.edge("n_asi", "n_video")
b.edge("n_uvc", "n_video", color=good_color)
b.edge("n_cv", "n_video", color=good_color)
b.edge("n_pi", "n_video", color=good_color)
b.edge("n_asi", "n_video", color=good_color)
with a.subgraph(name="cluster_camera") as c:
c.attr(
@ -75,10 +79,10 @@ with g.subgraph(name="cluster_hardware") as a:
c.node("n_canon", label="Canon DSLR")
c.node("n_nikon", label="Nikon DSLR")
c.node("n_indi", label="INDI")
c.edge("n_gphoto", "n_camera")
c.edge("n_canon", "n_camera")
c.edge("n_nikon", "n_camera")
c.edge("n_indi", "n_camera")
c.edge("n_gphoto", "n_camera", color=good_color)
c.edge("n_canon", "n_camera", color=good_color)
c.edge("n_nikon", "n_camera", color=good_color)
c.edge("n_indi", "n_camera", color=good_color)
with a.subgraph(name="cluster_allsky") as d:
d.attr(
style="filled", color="slateblue", label="Allsky Cameras", fontcolor="white"
@ -89,9 +93,9 @@ with g.subgraph(name="cluster_hardware") as a:
d.node("n_asi_allsky", label="ZWO ASI Allsky")
d.node("n_oculus", label="Starlight Xpress Oculus")
d.node("n_indi_allsky", label="INDI Allsky")
d.edge("n_asi_allsky", "n_allsky")
d.edge("n_oculus", "n_allsky")
d.edge("n_indi_allsky", "n_allsky")
d.edge("n_asi_allsky", "n_allsky", color=good_color)
d.edge("n_oculus", "n_allsky", color=good_color)
d.edge("n_indi_allsky", "n_allsky", color=good_color)
with g.subgraph(name="cluster_repository") as a:
a.attr(style="filled", color="palegreen4", label="Repository")
@ -105,16 +109,16 @@ with g.subgraph(name="cluster_repository") as a:
b.node("n_stvid", label="stvid")
b.node("n_stphot", label="stphot")
b.node("n_asm", label="asm")
b.edge("n_video", "n_stvid")
b.edge("n_camera", "n_stphot")
b.edge("n_allsky", "n_asm")
b.edge("n_video", "n_stvid", color=good_color)
b.edge("n_camera", "n_stphot", color=good_color)
b.edge("n_allsky", "n_asm", color=good_color)
b.attr(label="Development\nPython")
with a.subgraph(name="cluster_c_software") as c:
c.attr(color="tan")
c.node_attr["style"] = "filled"
c.node("n_sattools", label="sattools")
c.edge("n_video", "n_sattools")
c.edge("n_camera", "n_sattools")
c.edge("n_video", "n_sattools", color=good_color)
c.edge("n_camera", "n_sattools", color=good_color)
c.attr(label="Legacy\nC")
with g.subgraph(name="cluster_acquire") as a:
@ -128,17 +132,17 @@ with g.subgraph(name="cluster_acquire") as a:
)
b.node("n_stphot_acquire", label="stphot/acquire.py")
b.node("n_asm_acquire", label="asm/capture")
b.edge("n_sattools", "n_sattools_cacquire")
b.edge("n_stphot", "n_stphot_acquire")
b.edge("n_asm", "n_asm_acquire")
b.edge("n_sattools", "n_sattools_cacquire", color=good_color)
b.edge("n_stphot", "n_stphot_acquire", color=good_color)
b.edge("n_asm", "n_asm_acquire", color=good_color)
b.attr(label="Camera\nSample")
with a.subgraph(name="cluster_video_acquire") as c:
c.attr(color="tan")
c.node_attr["style"] = "filled"
c.node("n_sattools_vacquire", label="sattools/UNKNOWN-vid-get.sh")
c.node("n_stvid_acquire", label="stvid/acquire.py")
c.edge("n_sattools", "n_sattools_vacquire")
c.edge("n_stvid", "n_stvid_acquire")
c.edge("n_sattools", "n_sattools_vacquire", color=good_color)
c.edge("n_stvid", "n_stvid_acquire", color=good_color)
c.attr(label="Video\nSample")
@ -151,17 +155,17 @@ with g.subgraph(name="cluster_platesolver") as a:
b.node("n_sattools_cplate", label="sattools/scripts/find.sh\nsource-extractor")
b.node("n_stphot_plate", label="stphot/UNKNOWN-find.py")
b.node("n_asm_plate", label="asm/UNKNOWN-find")
b.edge("n_sattools_cacquire", "n_sattools_cplate")
b.edge("n_stphot_acquire", "n_stphot_plate")
b.edge("n_asm_acquire", "n_asm_plate")
b.edge("n_sattools_cacquire", "n_sattools_cplate", color=good_color)
b.edge("n_stphot_acquire", "n_stphot_plate", color=good_color)
b.edge("n_asm_acquire", "n_asm_plate", color=good_color)
b.attr(label="Camera\nPlate Solver")
with a.subgraph(name="cluster_video_platesolver") as c:
c.attr(color="pink")
c.node_attr["style"] = "filled"
c.node("n_sattools_vplate", label="sattools/UNKNOWN-vid-find.sh")
c.node("n_stvid_plate", label="stvid/process.py")
c.edge("n_sattools_vacquire", "n_sattools_vplate")
c.edge("n_stvid_acquire", "n_stvid_plate")
c.edge("n_sattools_vacquire", "n_sattools_vplate", color=good_color)
c.edge("n_stvid_acquire", "n_stvid_plate", color=good_color)
c.attr(label="Video\nPlate Solver")
with g.subgraph(name="cluster_satdetect") as a:
@ -173,17 +177,17 @@ with g.subgraph(name="cluster_satdetect") as a:
b.node("n_sattools_cdetect", label="sattools/scripts/id.sh\naddwcs\nsatid")
b.node("n_stphot_detect", label="stphot/UNKNOWN-detect.py")
b.node("n_asm_detect", label="asm/UNKNOWN-detect")
b.edge("n_sattools_cplate", "n_sattools_cdetect")
b.edge("n_stphot_plate", "n_stphot_detect")
b.edge("n_asm_plate", "n_asm_detect")
b.edge("n_sattools_cplate", "n_sattools_cdetect", color=good_color)
b.edge("n_stphot_plate", "n_stphot_detect", color=good_color)
b.edge("n_asm_plate", "n_asm_detect", color=good_color)
b.attr(label="Camera\nDetect Satellites")
with a.subgraph(name="cluster_video_satdetect") as c:
c.attr(color="tan")
c.node_attr["style"] = "filled"
c.node("n_sattools_vdetect", label="sattools/UNKNOWN-vid-detect.sh")
c.node("n_stvid_detect", label="stvid/process.py")
c.edge("n_sattools_vplate", "n_sattools_vdetect")
c.edge("n_stvid_plate", "n_stvid_detect")
c.edge("n_sattools_vplate", "n_sattools_vdetect", color=good_color)
c.edge("n_stvid_plate", "n_stvid_detect", color=good_color)
c.attr(label="Video\nDetect Satellites")
with g.subgraph(name="cluster_satid") as a:
@ -195,32 +199,32 @@ with g.subgraph(name="cluster_satid") as a:
b.node("n_sattools_cid", label="sattools/scripts/id.sh\naddwcs\nsatid")
b.node("n_stphot_id", label="stphot/UNKNOWN-id.py")
b.node("n_asm_id", label="asm/UNKNOWN-id")
b.edge("n_sattools_cdetect", "n_sattools_cid")
b.edge("n_stphot_detect", "n_stphot_id")
b.edge("n_asm_detect", "n_asm_id")
b.edge("n_sattools_cdetect", "n_sattools_cid", color=good_color)
b.edge("n_stphot_detect", "n_stphot_id", color=good_color)
b.edge("n_asm_detect", "n_asm_id", color=good_color)
b.attr(label="Camera\nID Satellite")
with a.subgraph(name="cluster_video_satid") as c:
c.attr(color="tan")
c.node_attr["style"] = "filled"
c.node("n_sattools_vid", label="sattools/UNKNOWN-vid-id.sh")
c.node("n_stvid_id", label="stvid/process.py")
c.edge("n_sattools_vdetect", "n_sattools_vid")
c.edge("n_stvid_detect", "n_stvid_id")
c.edge("n_sattools_vdetect", "n_sattools_vid", color=good_color)
c.edge("n_stvid_detect", "n_stvid_id", color=good_color)
c.attr(label="Video\nID Satellite")
g.attr("node", shape="doublecircle", style="filled", color="orange")
g.node("n_start", label="Start\nHere")
g.edge("n_start", "n_indi")
g.edge("n_start", "n_gphoto")
g.edge("n_start", "n_canon")
g.edge("n_start", "n_nikon")
g.edge("n_start", "n_asi")
g.edge("n_start", "n_pi")
g.edge("n_start", "n_cv")
g.edge("n_start", "n_uvc")
g.edge("n_start", "n_indi_allsky")
g.edge("n_start", "n_asi_allsky")
g.edge("n_start", "n_oculus")
g.edge("n_start", "n_indi", color=good_color)
g.edge("n_start", "n_gphoto", color=good_color)
g.edge("n_start", "n_canon", color=good_color)
g.edge("n_start", "n_nikon", color=good_color)
g.edge("n_start", "n_asi", color=good_color)
g.edge("n_start", "n_pi", color=good_color)
g.edge("n_start", "n_cv", color=good_color)
g.edge("n_start", "n_uvc", color=good_color)
g.edge("n_start", "n_indi_allsky", color=good_color)
g.edge("n_start", "n_asi_allsky", color=good_color)
g.edge("n_start", "n_oculus", color=good_color)
g.attr("node", shape="rectangle", style="filled", color="grey")
g.render(view=False, format="png")