Skip to content

Commit

Permalink
Cleanup documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
francescov1 committed May 4, 2020
1 parent 70f7570 commit fd2cf6c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
12 changes: 6 additions & 6 deletions CLI/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@ def __init__(self, defaults):
self.defaults = defaults

def run(self):
# NOTE: a bug in PyInquirer ignores the default for lists
# a workaround is to place your default as the first element
# in the array. See sim_type and heater_sim_type questions
questions = [
{
'type': 'list',
'name': 'sim_type',
'message': 'What type of simulation would you like to run?',
'choices': [
'scatter',
'single laser'
],
'default': 'single laser'
'choices': ['scatter', 'single laser'],
'default': 'scatter'
},
{
'type': 'input',
Expand All @@ -35,7 +35,7 @@ def run(self):
'type': 'list',
'name': 'heater_sim_type',
'message': 'How do you want to simulate the N-doped heater?',
'choices': ['sweep', 'constant voltage'],
'choices': ['constant voltage', 'sweep'],
'default': 'constant voltage'
},
{
Expand Down
12 changes: 8 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,29 @@

## Usage

* Install dependencies
1. In <i>Lumerical/interface.py</i>, set the Lumerical version and Lumerical installation path. For more information on how to find this information, see the Automation API documentation.

2. Install dependencies

```
pip install -r requirements.txt
```

* Run simulation platform
3. Run simulation platform

```
python main.py
```

* The application will walk you through setting up a simulation and give you an opportunity to download results.
4. The application will walk you through setting up a simulation and give you an opportunity to download results.

## Code Structure

This repository contains 3 main modules which make up the Silicon Photonic Neuromorphic software simulation package
* <b>Lumerical</b>: This module contains all resources related to Lumerical simulations. Cached simulation files are also stored here. <i>interface.py</i> implements the Lumerical Automation API to control simulations.
* <b>CLI</b>: This module collects input from a user using an intuitive command-line interface. It prompts the user for required information, making suggestions and aggregating the information for Lumerical.
* <b>API</b>: This module acts as the middleman between the CLI and Lumerical. It receives inputs from the CLI module and decides how to use them with the Lumerical module.
* <b>API</b>: This module acts as the middleman between the CLI and Lumerical. It receives inputs from the CLI module and decides how to use them with the Lumerical module. It also decides which simulation files can be used from the cache and which need to be re-simulated based on the user's inputs.

<i>Note: Default simulation resources are provided at the root level of the <i>Lumerical</i> module (the same resources that are stored in the cache). These have been heavily tested, so if any strange behaviour occurs with cached simulation data, try running the same simulation manually using the default files (as long as you haven't saved any changes to <i>weight_bank.icp</i> these should be setup to be used by default <b>only when opening & running the simulation manually, not through the CLI</b>)

* <b>Extras</b> This folder is not part of the software but has various code files and data I used to experiment, test and build this project. Most of the files are not setup to be used out of the box but could provide some solid resources to better understand Lumerical, INTERCONNECT and the Automation API.

0 comments on commit fd2cf6c

Please sign in to comment.