Give nodes (pseudo) variable names for easier labeling

main
Jeff Moe 2022-08-14 15:16:05 -06:00
parent db7062fcfd
commit 558cb2fca6
1 changed files with 97 additions and 63 deletions

160
SNOPO
View File

@ -41,16 +41,23 @@ g.attr(
fontcolor="black",
)
with g.subgraph(name="cluster_hardware") as a:
a.attr(style="filled", color="lightgrey")
a.node_attr.update(style="filled", color="pink", shape="rectangle")
a.attr(label="Hardware\nChoose One")
with a.subgraph(name="cluster_video") as b:
b.attr(style="filled", color="cornsilk", label="Motion Video Cameras")
b.node_attr.update(style="filled", color="darkkhaki", shape="tripleoctagon")
b.edge("UVC", "Video")
b.edge("OpenCV", "Video")
b.edge("Raspberry Pi", "Video")
b.edge("ZWO ASI", "Video")
b.node("n_uvc", label="UVC")
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")
with a.subgraph(name="cluster_camera") as c:
c.attr(
style="filled",
@ -64,10 +71,14 @@ with g.subgraph(name="cluster_hardware") as a:
shape="doubleoctagon",
fontcolor="white",
)
c.edge("gphoto2", "Camera")
c.edge("Canon DSLR", "Camera")
c.edge("Nikon DSLR", "Camera")
c.edge("INDI", "Camera")
c.node("n_gphoto", label="gphoto2")
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")
with a.subgraph(name="cluster_allsky") as d:
d.attr(
style="filled", color="slateblue", label="Allsky Cameras", fontcolor="white"
@ -75,118 +86,141 @@ with g.subgraph(name="cluster_hardware") as a:
d.node_attr.update(
style="filled", color="peru", shape="octagon", fontcolor="black"
)
d.edge("ZWO ASI Allsky", "Allsky")
d.edge("Starlight Xpress Oculus", "Allsky")
d.edge("INDI Allsky", "Allsky")
a.attr(label="Hardware\nChoose One")
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")
with g.subgraph(name="cluster_repository") as a:
a.attr(style="filled", color="lightgreen", label="Repository")
a.attr(style="filled", color="palegreen4", label="Repository")
a.attr(label="Software\nRepository\nChoose One")
with a.subgraph(name="cluster_camera_software") as b:
b.attr(color="lightblue")
b.node_attr["style"] = "filled"
b.edge("Video", "stvid")
b.edge("Camera", "stphot")
b.edge("Allsky", "asm")
b.node("n_video", label="Video")
b.node("n_camera", label="Camera")
b.node("n_allsky", label="Allsky")
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.attr(label="Development\nPython")
with a.subgraph(name="cluster_c_software") as c:
c.attr(color="tan")
c.node_attr["style"] = "filled"
c.edge("Video", "sattools")
c.edge("Camera", "sattools")
c.node("n_sattools", label="sattools")
c.edge("n_video", "n_sattools")
c.edge("n_camera", "n_sattools")
c.attr(label="Legacy\nC")
a.attr(label="Software\nRepository\nChoose One")
with g.subgraph(name="cluster_acquire") as a:
a.attr(style="filled", color="pink", label="Acquire")
a.attr(label="Acquire Sample")
with a.subgraph(name="cluster_camera_acquire") as b:
b.attr(color="lightblue")
b.node_attr["style"] = "filled"
b.edge("sattools", "sattools/scripts/get.sh\ngphoto2\njpg2fits")
b.edge("stphot", "stphot/acquire.py")
b.edge("asm", "asm/capture")
b.node(
"n_sattools_cacquire", label="sattools/scripts/get.sh\ngphoto2\njpg2fits"
)
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.attr(label="Camera\nSample")
with a.subgraph(name="cluster_video_acquire") as c:
c.attr(color="tan")
c.node_attr["style"] = "filled"
c.edge("sattools", "sattools/UNKNOWN-vid-get.sh")
c.edge("stvid", "stvid/acquire.py")
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.attr(label="Video\nSample")
a.attr(label="Acquire Sample")
with g.subgraph(name="cluster_platesolver") as a:
a.attr(style="filled", color="tan", label="Plate Solver")
a.attr(label="Plate Solver")
with a.subgraph(name="cluster_camera_plate_solver") as b:
b.attr(color="lightblue")
b.node_attr["style"] = "filled"
b.edge(
"sattools/scripts/get.sh\ngphoto2\njpg2fits",
"sattools/scripts/find.sh\nsource-extractor",
)
b.edge("stphot/acquire.py", "stphot/UNKNOWN-find.py")
b.edge("asm/capture", "asm/UNKNOWN-find")
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.attr(label="Camera\nPlate Solver")
with a.subgraph(name="cluster_video_platesolver") as c:
c.attr(color="pink")
c.node_attr["style"] = "filled"
c.edge("sattools/UNKNOWN-vid-get.sh", "sattools/UNKNOWN-vid-find.sh")
c.edge("stvid/acquire.py", "stvid/process.py")
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.attr(label="Video\nPlate Solver")
a.attr(label="Plate Solver")
with g.subgraph(name="cluster_satdetect") as a:
a.attr(style="filled", color="lightblue", label="satdetect")
a.attr(label="Detect Satellites")
with a.subgraph(name="cluster_camera_satdetect") as b:
b.attr(color="tan")
b.node_attr["style"] = "filled"
b.edge(
"sattools/scripts/find.sh\nsource-extractor",
"sattools/scripts/id.sh\naddwcs\nsatid\nDetect",
)
b.edge("stphot/UNKNOWN-find.py", "stphot/UNKNOWN-id.py\nDetect")
b.edge("asm/UNKNOWN-find", "asm/UNKNOWN-id\nDetect")
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.attr(label="Camera\nDetect Satellites")
with a.subgraph(name="cluster_video_satdetect") as c:
c.attr(color="tan")
c.node_attr["style"] = "filled"
c.edge("sattools/UNKNOWN-vid-find.sh", "sattools/UNKNOWN-vid-id.sh\nDetect")
c.edge("stvid/process.py", "stvid/process.py\nDetect")
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.attr(label="Video\nDetect Satellites")
a.attr(label="Detect Satellites")
with g.subgraph(name="cluster_satid") as a:
a.attr(style="filled", color="lightblue", label="satid")
a.attr(label="Identify Satellites")
with a.subgraph(name="cluster_camera_satid") as b:
b.attr(color="tan")
b.node_attr["style"] = "filled"
b.edge(
"sattools/scripts/id.sh\naddwcs\nsatid\nDetect",
"sattools/scripts/id.sh\naddwcs\nsatid\nID",
)
b.edge("stphot/UNKNOWN-id.py\nDetect", "stphot/UNKNOWN-id.py\nID")
b.edge("asm/UNKNOWN-id\nDetect", "asm/UNKNOWN-id\nID")
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.attr(label="Camera\nID Satellite")
with a.subgraph(name="cluster_video_satid") as c:
c.attr(color="tan")
c.node_attr["style"] = "filled"
c.edge("sattools/UNKNOWN-vid-id.sh\nDetect", "sattools/UNKNOWN-vid-id.sh\nID")
c.edge("stvid/process.py\nDetect", "stvid/process.py\nID")
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.attr(label="Video\nID Satellite")
a.attr(label="Identify Satellites")
g.attr("node", shape="doublecircle", style="filled", color="orange")
g.edge("Start\nHere", "INDI")
g.edge("Start\nHere", "gphoto2")
g.edge("Start\nHere", "Canon DSLR")
g.edge("Start\nHere", "Nikon DSLR")
g.edge("Start\nHere", "ZWO ASI")
g.edge("Start\nHere", "Raspberry Pi")
g.edge("Start\nHere", "OpenCV")
g.edge("Start\nHere", "UVC")
g.edge("Start\nHere", "INDI Allsky")
g.edge("Start\nHere", "ZWO ASI Allsky")
g.edge("Start\nHere", "Starlight Xpress Oculus")
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.attr("node", shape="rectangle", style="filled", color="grey")
g.render(view=False, format="png")