Skip to content

Commit

Permalink
Merge pull request #3 from douglase/spie2018
Browse files Browse the repository at this point in the history
simpler example
  • Loading branch information
douglase authored May 12, 2018
2 parents 881df02 + e7f7617 commit ee75cc9
Show file tree
Hide file tree
Showing 23 changed files with 140 additions and 187 deletions.
10 changes: 5 additions & 5 deletions Digraph.gv
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@ digraph {
rankdir=LR
size="200,50"
"Mission-01" [label="Mission-01
Demonstrate Coronagraph"]
User requirement"]
"Mission-02" [label="Mission-02
Circumstellar Environments"]
Constraints"]
"Mission-03" [label="Mission-03
Sounding Rocket"]
"SCI-01" [label="SCI-01
Inner system"]
Science requirement I"]
"Mission-02" -> "SCI-01"
"SCI-02" [label="SCI-02
Debris disk sensitivity"]
Science requirement II"]
"Mission-02" -> "SCI-02"
"SCI-03" [label="SCI-03
Nulling Coronagraph in Space"]
Science requirement III"]
"Mission-01" -> "SCI-03"
"Mission-03" -> "SCI-03"
"Tech-1" [label="Tech-1
Expand Down
Binary file removed Digraph.gv.png
Binary file not shown.
Binary file added Digraph_gv.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,7 @@ expands published links to sublevels. To install this branch:


## Most recently committed flowchart:

![Most recently committed flowchart of requirements](Digraph.gv.png) Requirements flowchart
![Most recently committed flowchart of requirements](Digraph_gv.png) Requirements flowchart



Expand Down
51 changes: 40 additions & 11 deletions RunGraphviz.py
Original file line number Diff line number Diff line change
@@ -1,28 +1,57 @@
print('generating graphviz diagram with graphviz for python')
from graphviz import Digraph
import yaml

import numpy as np
import doorstop
import textwrap
np.random.seed(0)
tree=doorstop.core.build()

dot = Digraph(comment='The Requirements', format='png')
dot.body.extend([ 'rankdir=LR','size="200,50"']) #,
dot.body.extend([ 'rankdir=LR','ratio=.65','size="75,50"','rank=min', "dpi = 25"]) #,
dot.node_attr.update(color='lightblue2', style='filled',fontsize="55")

show_orphans=True
use_id=True
use_short_names=True
colors=['black','blue','chocolate','crimson', 'orchid', 'green','darkgreen','khaki','violet','purple','orange','lightblue2',]
n_colors = len(colors)

level_colors = ['gray95','gray88','gray79','green',]

for document in tree.documents:
for item in document.items:
for doc_n, document in enumerate(tree.documents):

#skip level 3:
if doc_n >3:
continue
for i,item in enumerate(document.items):
content=""
if use_id:
content=item.uid.value+"\n"
if use_short_names:
content=item.uid.value+"\n"+str(item.data["short name"])
content=content+str(item.data["short name"])
else:
content=content+item.uid.value+"\n"+textwrap.fill(item.text,35)
#skip items that have no back links, unless they are the first level
if show_orphans:
dot.node(item.uid.value,content,color=level_colors[doc_n])#item.text)
elif (len(item.links) >0) | (doc_n ==0):
dot.node(item.uid.value,content,color=level_colors[doc_n])#item.text)
else:
content=item.uid.value+"\n"+textwrap.fill(item.text,35)
dot.node(item.uid.value,content)#item.text)
print("skipping: "+item.uid.value)
continue
for link in item.links:
dot.edge(link.value,item.uid.value)#, constraint='false')


dot.render()#save("dot.svg")
width=str(np.random.rand()*5+5)
if link.value[:6] ==item.uid.value[:6]:
style='dashed'
else:
style='solid'
dot.edge(link.value,item.uid.value,
color=colors[i % n_colors],
style=style,
penwidth=width)#, constraint='false')

dot.body.append('fontsize=20')
dot.render('Digraph_gv')#save("dot.svg")

print('graphviz rendered')
28 changes: 10 additions & 18 deletions dist/L1.markdown
Original file line number Diff line number Diff line change
@@ -1,28 +1,20 @@
1 Mission-01
============
User requirement 1 Mission-01
=============================

Demonstrate Coronagraph

The mission shall demonstrate high contrast imaging via an internal
coronagraph in space
Mission level requirement A

*Child links:* [SCI-03](L2.markdown#1-sci-03-)

1 Mission-02
============

Circumstellar Environments
Constraints 1 Mission-02
========================

The mission shall characterize the circumstellar environment of a nearby
star
Mission level requirement B

*Child links:* [SCI-01](L2.markdown#1-sci-01-) , [SCI-02](L2.markdown#1-sci-02-)

1 Mission-03
============
User requirement 1 Mission-03
=============================

Sounding Rocket
Mission level requirement C

The mission shall fly on a suborbital sounding rocket

*Child links:* [SCI-03](L2.markdown#1-sci-03-) , [Tech-5](L3.markdown#1-tech-5-)
*Child links:* [SCI-03](L2.markdown#1-sci-03-)
35 changes: 12 additions & 23 deletions dist/L2.markdown
Original file line number Diff line number Diff line change
@@ -1,38 +1,27 @@
1 SCI-01
========
Science requirement I 1 SCI-01
==============================

Inner system

The mission shall observe the inner Epsilon Eridani system from two to
20 astronomical units in visible light
Mission shall be able to perform example measurement one

*Parent links:* [Mission-02](L1.markdown#1-mission-02-)

*Child links:* [Tech-1](L3.markdown#1-tech-1-) , [Tech-2](L3.markdown#1-tech-2-) ,
[Tech-3](L3.markdown#1-tech-3-)

1 SCI-02
========
*Child links:* [Tech-1](L3.markdown#1-tech-1-)

Debris disk sensitivity
Science requirement II 1 SCI-02
===============================

The mission shall observe the inner Epsilon Eridani system from for
sufficient time to measure a 2\*10\^(-4) L\_star debris disk at 3AU. See
Backman et al 2009, http://adsabs.harvard.edu/abs/2009ApJ...690.1522B
Mission shall be able to perform example measurement two

*Parent links:* [Mission-02](L1.markdown#1-mission-02-)

*Child links:* [Tech-4](L3.markdown#1-tech-4-) , [Tech-5](L3.markdown#1-tech-5-)

1 SCI-03
========
*Child links:* [Tech-2](L3.markdown#1-tech-2-) , [Tech-3](L3.markdown#1-tech-3-)

Nulling Coronagraph in Space
Science requirement III 1 SCI-03
================================

The mission shall demonstrate operation of a visible nulling coronagraph
in space
Mission shall be able to perform example measurement three

*Parent links:* [Mission-01](L1.markdown#1-mission-01-) ,
[Mission-03](L1.markdown#1-mission-03-)

*Child links:* [Tech-4](L3.markdown#1-tech-4-)
*Child links:* [Tech-2](L3.markdown#1-tech-2-)
46 changes: 10 additions & 36 deletions dist/L3.markdown
Original file line number Diff line number Diff line change
@@ -1,46 +1,20 @@
1 Tech-1
========
Instrument Alpha 1 Tech-1
=========================

Science bandpass

The science bandpass shall extend from 600-750 nm
Technical instrument requirement Alpha

*Parent links:* [SCI-01](L2.markdown#1-sci-01-)

1 Tech-2
========

IWA

The coronagraph inner working shall be less than 0.7".

*Parent links:* [SCI-01](L2.markdown#1-sci-01-)

1 Tech-3
========

OWA
Instrument Beta 1 Tech-2
========================

The coronagraph outer working shall be greater than 7"

*Parent links:* [SCI-01](L2.markdown#1-sci-01-)

1 Tech-4
========

Pointing Stability

The payload shall provide pointing within 10 milliarcseconds. See
Mendillo et al 2012, http://dx.doi.org/10.1364/AO.51.007069.
Technical instrument requirement Beta

*Parent links:* [SCI-02](L2.markdown#1-sci-02-) , [SCI-03](L2.markdown#1-sci-03-)

1 Tech-5
========

Telescope aperture
Instrument Gamma 1 Tech-3
=========================

The telescope aperture shall be less than 0.5 meters
Technical instrument requirement Gamma

*Parent links:* [Mission-03](L1.markdown#1-mission-03-) ,
[SCI-02](L2.markdown#1-sci-02-)
*Parent links:* [SCI-02](L2.markdown#1-sci-02-)
14 changes: 6 additions & 8 deletions dist/index.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,18 @@

### Published Documents:

- [L1](L1.markdown)
- [L2](L2.markdown)
- [L3](L3.markdown)
- [L2](L2.markdown)
- [L1](L1.markdown)

------------------------------------------------------------------------

### Item Traceability:

[L1](L1.markdown) [L2](L2.markdown) [L3](L3.markdown)
---------------------------------- -------------------------- --------------------------
[Mission-01](L1.markdown#1-mission-01-) [SCI-03](L2.markdown#1-sci-03-) [Tech-4](L3.markdown#1-tech-4-)
[Mission-01](L1.markdown#1-mission-01-) [SCI-03](L2.markdown#1-sci-03-) [Tech-2](L3.markdown#1-tech-2-)
[Mission-02](L1.markdown#1-mission-02-) [SCI-01](L2.markdown#1-sci-01-) [Tech-1](L3.markdown#1-tech-1-)
[Mission-02](L1.markdown#1-mission-02-) [SCI-01](L2.markdown#1-sci-01-) [Tech-2](L3.markdown#1-tech-2-)
[Mission-02](L1.markdown#1-mission-02-) [SCI-01](L2.markdown#1-sci-01-) [Tech-3](L3.markdown#1-tech-3-)
[Mission-02](L1.markdown#1-mission-02-) [SCI-02](L2.markdown#1-sci-02-) [Tech-4](L3.markdown#1-tech-4-)
[Mission-02](L1.markdown#1-mission-02-) [SCI-02](L2.markdown#1-sci-02-) [Tech-5](L3.markdown#1-tech-5-)
[Mission-03](L1.markdown#1-mission-03-) [SCI-03](L2.markdown#1-sci-03-) [Tech-4](L3.markdown#1-tech-4-)
[Mission-02](L1.markdown#1-mission-02-) [SCI-02](L2.markdown#1-sci-02-) [Tech-2](L3.markdown#1-tech-2-)
[Mission-02](L1.markdown#1-mission-02-) [SCI-02](L2.markdown#1-sci-02-) [Tech-3](L3.markdown#1-tech-3-)
[Mission-03](L1.markdown#1-mission-03-) [SCI-03](L2.markdown#1-sci-03-) [Tech-2](L3.markdown#1-tech-2-)
8 changes: 4 additions & 4 deletions mission_L1.csv
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
uid,level,text,links,short name,additional notes,mission success criteria,rationale,reviewed
Mission-01,1,The mission shall demonstrate high contrast imaging via an internal coronagraph in space,,Demonstrate Coronagraph,,,,
Mission-02,1,The mission shall characterize the circumstellar environment of a nearby star,,Circumstellar Environments,,,,
Mission-03,1,The mission shall fly on a suborbital sounding rocket,,Sounding Rocket,,,,
uid,level,text,links,short name,additional notes,mission success criteria,rationale,reviewed,verification plan
Mission-01,1,Mission level requirement A,,User requirement ,,,,,
Mission-02,1,Mission level requirement B,,Constraints,,,,,
Mission-03,1,Mission level requirement C,,User requirement ,,,,,
8 changes: 4 additions & 4 deletions reqs/L1/Mission-01.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ mission success criteria: ''
normative: true
rationale: ''
ref: ''
reviewed: b53b445776fdd3768439e769342b091b
short name: Demonstrate Coronagraph
reviewed: 4df33868b6317d02b557a7bd48124bab
short name: User requirement
text: |
The mission shall demonstrate high contrast imaging via an internal
coronagraph in space
Mission level requirement A
verification plan: ''
7 changes: 4 additions & 3 deletions reqs/L1/Mission-02.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ mission success criteria: ''
normative: true
rationale: ''
ref: ''
reviewed: b993bd506970ab982f9101ae3f21e220
short name: Circumstellar Environments
reviewed: 79070034b1a1744bace885529089f2cc
short name: Constraints
text: |
The mission shall characterize the circumstellar environment of a nearby star
Mission level requirement B
verification plan: ''
7 changes: 4 additions & 3 deletions reqs/L1/Mission-03.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ mission success criteria: ''
normative: true
rationale: ''
ref: ''
reviewed: 3138500b34dd01d7b85feffe98b3c6c0
short name: Sounding Rocket
reviewed: 0d6c52fe65c60e9e6a48c6c1b189a3e7
short name: User requirement
text: |
The mission shall fly on a suborbital sounding rocket
Mission level requirement C
verification plan: ''
10 changes: 5 additions & 5 deletions reqs/L2/SCI-01.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ additional notes: ''
derived: false
level: 1
links:
- Mission-02: b993bd506970ab982f9101ae3f21e220
- Mission-02: 79070034b1a1744bace885529089f2cc
mission success criteria: ''
normative: true
rationale: ''
ref: ''
reviewed: 5165cf0a662f29bb25428af6ed664c0a
short name: Inner system
reviewed: ce35d65c066a99144f5cd0b6cfba2f85
short name: Science requirement I
text: |
The mission shall observe the inner Epsilon Eridani system from two to 20
astronomical units in visible light
Mission shall be able to perform example measurement one
verification plan: ''
11 changes: 5 additions & 6 deletions reqs/L2/SCI-02.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,13 @@ additional notes: ''
derived: false
level: 1
links:
- Mission-02: b993bd506970ab982f9101ae3f21e220
- Mission-02: 79070034b1a1744bace885529089f2cc
mission success criteria: ''
normative: true
rationale: ''
ref: ''
reviewed: c2cd86963f56bc6777dc19a31d0a4ad9
short name: Debris disk sensitivity
reviewed: 3f2b27210890485fd2c8e2391cd62157
short name: Science requirement II
text: |
The mission shall observe the inner Epsilon Eridani system from for
sufficient time to measure a 2*10^(-4) L_star debris disk at 3AU. See Backman
et al 2009, http://adsabs.harvard.edu/abs/2009ApJ...690.1522B
Mission shall be able to perform example measurement two
verification plan: ''
12 changes: 6 additions & 6 deletions reqs/L2/SCI-03.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ additional notes: ''
derived: false
level: 1
links:
- Mission-01: b53b445776fdd3768439e769342b091b
- Mission-03: 3138500b34dd01d7b85feffe98b3c6c0
- Mission-01: 4df33868b6317d02b557a7bd48124bab
- Mission-03: 0d6c52fe65c60e9e6a48c6c1b189a3e7
mission success criteria: ''
normative: true
rationale: ''
ref: ''
reviewed: 69d2870a65ec1424170726236d1f1e98
short name: Nulling Coronagraph in Space
reviewed: 28477f4723958c1f1b1a329c803b7ba5
short name: Science requirement III
text: |
The mission shall demonstrate operation of a visible nulling coronagraph in
space
Mission shall be able to perform example measurement three
verification plan: ''
Loading

0 comments on commit ee75cc9

Please sign in to comment.