aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2017-09-09 21:23:36 +0200
committerTrygve Laugstøl <trygvis@inamo.no>2017-09-09 21:23:36 +0200
commit6887e773e17beb5a6c2df0c7397d5223eebde37e (patch)
tree769d5eebeb186e307d5e18f88bebc1c31236968e
parent736b7b25f913d21578e26940265b20acabf62cd9 (diff)
downloadee-python-6887e773e17beb5a6c2df0c7397d5223eebde37e.tar.gz
ee-python-6887e773e17beb5a6c2df0c7397d5223eebde37e.tar.bz2
ee-python-6887e773e17beb5a6c2df0c7397d5223eebde37e.tar.xz
ee-python-6887e773e17beb5a6c2df0c7397d5223eebde37e.zip
misc wip.
-rw-r--r--demo/kicad/bad-bom.kicad_pcb1
-rw-r--r--demo/kicad/bad-bom.pro60
-rw-r--r--demo/kicad/bad-bom.sch1
-rw-r--r--demo/kicad/bad-bom.xml114
-rw-r--r--demo/notebooks/BOM Demo.ipynb1400
-rw-r--r--demo/notebooks/bad-bom.ipynb437
6 files changed, 613 insertions, 1400 deletions
diff --git a/demo/kicad/bad-bom.kicad_pcb b/demo/kicad/bad-bom.kicad_pcb
new file mode 100644
index 0000000..02c8ecb
--- /dev/null
+++ b/demo/kicad/bad-bom.kicad_pcb
@@ -0,0 +1 @@
+(kicad_pcb (version 4) (host kicad "dummy file") )
diff --git a/demo/kicad/bad-bom.pro b/demo/kicad/bad-bom.pro
new file mode 100644
index 0000000..ad651d2
--- /dev/null
+++ b/demo/kicad/bad-bom.pro
@@ -0,0 +1,60 @@
+update=sø. 13. aug. 2017 kl. 11.43 +0200
+version=1
+last_client=kicad
+[pcbnew]
+version=1
+LastNetListRead=
+UseCmpFile=1
+PadDrill=0.600000000000
+PadDrillOvalY=0.600000000000
+PadSizeH=1.500000000000
+PadSizeV=1.500000000000
+PcbTextSizeV=1.500000000000
+PcbTextSizeH=1.500000000000
+PcbTextThickness=0.300000000000
+ModuleTextSizeV=1.000000000000
+ModuleTextSizeH=1.000000000000
+ModuleTextSizeThickness=0.150000000000
+SolderMaskClearance=0.000000000000
+SolderMaskMinWidth=0.000000000000
+DrawSegmentWidth=0.200000000000
+BoardOutlineThickness=0.100000000000
+ModuleOutlineThickness=0.150000000000
+[cvpcb]
+version=1
+NetIExt=net
+[eeschema]
+version=1
+LibDir=
+[eeschema/libraries]
+LibName1=power
+LibName2=device
+LibName3=transistors
+LibName4=conn
+LibName5=linear
+LibName6=regul
+LibName7=74xx
+LibName8=cmos4000
+LibName9=adc-dac
+LibName10=memory
+LibName11=xilinx
+LibName12=microcontrollers
+LibName13=dsp
+LibName14=microchip
+LibName15=analog_switches
+LibName16=motorola
+LibName17=texas
+LibName18=intel
+LibName19=audio
+LibName20=interface
+LibName21=digital-audio
+LibName22=philips
+LibName23=display
+LibName24=cypress
+LibName25=siliconi
+LibName26=opto
+LibName27=atmel
+LibName28=contrib
+LibName29=valves
+[general]
+version=1
diff --git a/demo/kicad/bad-bom.sch b/demo/kicad/bad-bom.sch
new file mode 100644
index 0000000..8b829fb
--- /dev/null
+++ b/demo/kicad/bad-bom.sch
@@ -0,0 +1 @@
+EESchema Schematic File Version 2
diff --git a/demo/kicad/bad-bom.xml b/demo/kicad/bad-bom.xml
new file mode 100644
index 0000000..8e5279a
--- /dev/null
+++ b/demo/kicad/bad-bom.xml
@@ -0,0 +1,114 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<export version="D">
+ <design>
+ <source>/home/trygvis/tmp/sage/ee-python/demo/kicad/bad-bom.sch</source>
+ <date>sø. 13. aug. 2017 kl. 11.51 +0200</date>
+ <tool>Eeschema 4.0.6+dfsg1-1</tool>
+ <sheet number="1" name="/" tstamps="/">
+ <title_block>
+ <title/>
+ <company/>
+ <rev/>
+ <date/>
+ <source>bad-bom.sch</source>
+ <comment number="1" value=""/>
+ <comment number="2" value=""/>
+ <comment number="3" value=""/>
+ <comment number="4" value=""/>
+ </title_block>
+ </sheet>
+ </design>
+ <components>
+ <comp ref="R2">
+ <value>10k</value>
+ <libsource lib="device" part="R"/>
+ <sheetpath names="/" tstamps="/"/>
+ <tstamp>59901F37</tstamp>
+ </comp>
+ <comp ref="R1">
+ <value>10k</value>
+ <footprint>Resistors_SMD:R_1206</footprint>
+ <fields>
+ <field name="digikey">311-1.00KFRTR-ND</field>
+ <field name="mpn">RC1206FR-071KL</field>
+ </fields>
+ <libsource lib="device" part="R"/>
+ <sheetpath names="/" tstamps="/"/>
+ <tstamp>59901F82</tstamp>
+ </comp>
+ <comp ref="C3">
+ <value>100n</value>
+ <libsource lib="device" part="C"/>
+ <sheetpath names="/" tstamps="/"/>
+ <tstamp>5990209F</tstamp>
+ </comp>
+ <comp ref="C4">
+ <value>1uF</value>
+ <libsource lib="device" part="C"/>
+ <sheetpath names="/" tstamps="/"/>
+ <tstamp>5990210B</tstamp>
+ </comp>
+ </components>
+ <libparts>
+ <libpart lib="device" part="C">
+ <description>Unpolarized capacitor</description>
+ <footprints>
+ <fp>C_*</fp>
+ </footprints>
+ <fields>
+ <field name="Reference">C</field>
+ <field name="Value">C</field>
+ </fields>
+ <pins>
+ <pin num="1" name="~" type="passive"/>
+ <pin num="2" name="~" type="passive"/>
+ </pins>
+ </libpart>
+ <libpart lib="device" part="R">
+ <description>Resistor</description>
+ <footprints>
+ <fp>R_*</fp>
+ <fp>R_*</fp>
+ </footprints>
+ <fields>
+ <field name="Reference">R</field>
+ <field name="Value">R</field>
+ </fields>
+ <pins>
+ <pin num="1" name="~" type="passive"/>
+ <pin num="2" name="~" type="passive"/>
+ </pins>
+ </libpart>
+ </libparts>
+ <libraries>
+ <library logical="device">
+ <uri>/usr/share/kicad/library/device.lib</uri>
+ </library>
+ </libraries>
+ <nets>
+ <net code="1" name="Net-(R2-Pad1)">
+ <node ref="R2" pin="1"/>
+ </net>
+ <net code="2" name="Net-(R2-Pad2)">
+ <node ref="R2" pin="2"/>
+ </net>
+ <net code="3" name="Net-(R1-Pad1)">
+ <node ref="R1" pin="1"/>
+ </net>
+ <net code="4" name="Net-(R1-Pad2)">
+ <node ref="R1" pin="2"/>
+ </net>
+ <net code="5" name="Net-(C3-Pad1)">
+ <node ref="C3" pin="1"/>
+ </net>
+ <net code="6" name="Net-(C3-Pad2)">
+ <node ref="C3" pin="2"/>
+ </net>
+ <net code="7" name="Net-(C4-Pad1)">
+ <node ref="C4" pin="1"/>
+ </net>
+ <net code="8" name="Net-(C4-Pad2)">
+ <node ref="C4" pin="2"/>
+ </net>
+ </nets>
+</export>
diff --git a/demo/notebooks/BOM Demo.ipynb b/demo/notebooks/BOM Demo.ipynb
deleted file mode 100644
index f9d6faa..0000000
--- a/demo/notebooks/BOM Demo.ipynb
+++ /dev/null
@@ -1,1400 +0,0 @@
-{
- "cells": [
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "### Notebook configuration"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 115,
- "metadata": {},
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "The autoreload extension is already loaded. To reload it, use:\n",
- " %reload_ext autoreload\n"
- ]
- }
- ],
- "source": [
- "%load_ext autoreload\n",
- "%autoreload 2\n",
- "\n",
- "%aimport ee.kicad.bom\n",
- "%aimport ee.kicad.bom.io\n",
- "\n",
- "from ee.kicad.bom import *\n",
- "from ee.kicad.bom.io import read_bom"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 170,
- "metadata": {
- "collapsed": true
- },
- "outputs": [],
- "source": [
- "bom_file = \"../kicad/bom/A64-OlinuXino_Rev_C.xml\"\n",
- "bom_file = \"../kicad/bom/gw.xml\""
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "# Load the BOM, sort by reference"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 199,
- "metadata": {
- "scrolled": true
- },
- "outputs": [],
- "source": [
- "import os\n",
- "import os.path\n",
- "import pandas\n",
- "\n",
- "bom = read_bom(bom_file).to_pandas()"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "# Sort a BOM"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 200,
- "metadata": {
- "scrolled": true
- },
- "outputs": [],
- "source": [
- "f=lambda x: pandas.Series(data=x, index=['ref_name', 'ref_num', 'ref_rest'])\n",
- "sort_fields=bom[\"ref\"].map(ee.kicad.bom.split_ref).apply(f)\n",
- "\n",
- "bom=pandas.concat([bom, sort_fields], axis=1, join_axes=[bom.index])\n",
- "bom=bom.sort_values(by=list(sort_fields.columns))\n"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 201,
- "metadata": {},
- "outputs": [
- {
- "data": {
- "text/html": [
- "<div>\n",
- "<style>\n",
- " .dataframe thead tr:only-child th {\n",
- " text-align: right;\n",
- " }\n",
- "\n",
- " .dataframe thead th {\n",
- " text-align: left;\n",
- " }\n",
- "\n",
- " .dataframe tbody tr th {\n",
- " vertical-align: top;\n",
- " }\n",
- "</style>\n",
- "<table border=\"1\" class=\"dataframe\">\n",
- " <thead>\n",
- " <tr style=\"text-align: right;\">\n",
- " <th></th>\n",
- " <th>Capacitance</th>\n",
- " <th>Color</th>\n",
- " <th>Description</th>\n",
- " <th>Frequency</th>\n",
- " <th>Impedance</th>\n",
- " <th>Inductance</th>\n",
- " <th>Manufacturer</th>\n",
- " <th>Part Number</th>\n",
- " <th>Resistance</th>\n",
- " <th>ref</th>\n",
- " <th>value</th>\n",
- " <th>ref_name</th>\n",
- " <th>ref_num</th>\n",
- " <th>ref_rest</th>\n",
- " </tr>\n",
- " </thead>\n",
- " <tbody>\n",
- " <tr>\n",
- " <th>C1</th>\n",
- " <td>1.0uF</td>\n",
- " <td>None</td>\n",
- " <td>1.0uF, 10Vdc, ±20%, X5R</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>Murata</td>\n",
- " <td>GRM153R61A105ME95</td>\n",
- " <td>None</td>\n",
- " <td>C1</td>\n",
- " <td>C0402_1u_10Vdc_X5R</td>\n",
- " <td>C</td>\n",
- " <td>1</td>\n",
- " <td></td>\n",
- " </tr>\n",
- " <tr>\n",
- " <th>C2</th>\n",
- " <td>1.0uF</td>\n",
- " <td>None</td>\n",
- " <td>1.0uF, 10Vdc, ±20%, X5R</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>Murata</td>\n",
- " <td>GRM153R61A105ME95</td>\n",
- " <td>None</td>\n",
- " <td>C2</td>\n",
- " <td>C0402_1u_10Vdc_X5R</td>\n",
- " <td>C</td>\n",
- " <td>2</td>\n",
- " <td></td>\n",
- " </tr>\n",
- " <tr>\n",
- " <th>C3</th>\n",
- " <td>1.0uF</td>\n",
- " <td>None</td>\n",
- " <td>1.0uF, 10Vdc, ±20%, X5R</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>Murata</td>\n",
- " <td>GRM153R61A105ME95</td>\n",
- " <td>None</td>\n",
- " <td>C3</td>\n",
- " <td>C0402_1u_10Vdc_X5R</td>\n",
- " <td>C</td>\n",
- " <td>3</td>\n",
- " <td></td>\n",
- " </tr>\n",
- " <tr>\n",
- " <th>C4</th>\n",
- " <td>1.0uF</td>\n",
- " <td>None</td>\n",
- " <td>1.0uF, 10Vdc, ±20%, X5R</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>Murata</td>\n",
- " <td>GRM153R61A105ME95</td>\n",
- " <td>None</td>\n",
- " <td>C4</td>\n",
- " <td>C0402_1u_10Vdc_X5R</td>\n",
- " <td>C</td>\n",
- " <td>4</td>\n",
- " <td></td>\n",
- " </tr>\n",
- " <tr>\n",
- " <th>C5</th>\n",
- " <td>1.0uF</td>\n",
- " <td>None</td>\n",
- " <td>1.0uF, 10Vdc, ±20%, X5R</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>Murata</td>\n",
- " <td>GRM153R61A105ME95</td>\n",
- " <td>None</td>\n",
- " <td>C5</td>\n",
- " <td>C0402_1u_10Vdc_X5R</td>\n",
- " <td>C</td>\n",
- " <td>5</td>\n",
- " <td></td>\n",
- " </tr>\n",
- " <tr>\n",
- " <th>C6</th>\n",
- " <td>1.0uF</td>\n",
- " <td>None</td>\n",
- " <td>1.0uF, 10Vdc, ±20%, X5R</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>Murata</td>\n",
- " <td>GRM153R61A105ME95</td>\n",
- " <td>None</td>\n",
- " <td>C6</td>\n",
- " <td>C0402_1u_10Vdc_X5R</td>\n",
- " <td>C</td>\n",
- " <td>6</td>\n",
- " <td></td>\n",
- " </tr>\n",
- " <tr>\n",
- " <th>C7</th>\n",
- " <td>1.0uF</td>\n",
- " <td>None</td>\n",
- " <td>1.0uF, 10Vdc, ±20%, X5R</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>Murata</td>\n",
- " <td>GRM153R61A105ME95</td>\n",
- " <td>None</td>\n",
- " <td>C7</td>\n",
- " <td>C0402_1u_10Vdc_X5R</td>\n",
- " <td>C</td>\n",
- " <td>7</td>\n",
- " <td></td>\n",
- " </tr>\n",
- " <tr>\n",
- " <th>C8</th>\n",
- " <td>1.0uF</td>\n",
- " <td>None</td>\n",
- " <td>1.0uF, 10Vdc, ±20%, X5R</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>Murata</td>\n",
- " <td>GRM153R61A105ME95</td>\n",
- " <td>None</td>\n",
- " <td>C8</td>\n",
- " <td>C0402_1u_10Vdc_X5R</td>\n",
- " <td>C</td>\n",
- " <td>8</td>\n",
- " <td></td>\n",
- " </tr>\n",
- " <tr>\n",
- " <th>C9</th>\n",
- " <td>1.0uF</td>\n",
- " <td>None</td>\n",
- " <td>1.0uF, 10Vdc, ±20%, X5R</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>Murata</td>\n",
- " <td>GRM153R61A105ME95</td>\n",
- " <td>None</td>\n",
- " <td>C9</td>\n",
- " <td>C0402_1u_10Vdc_X5R</td>\n",
- " <td>C</td>\n",
- " <td>9</td>\n",
- " <td></td>\n",
- " </tr>\n",
- " <tr>\n",
- " <th>C10</th>\n",
- " <td>4.7uF</td>\n",
- " <td>None</td>\n",
- " <td>4.7uF, 6.3Vdc, ±20%, X5R</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>Murata</td>\n",
- " <td>GRM185R60J475ME15</td>\n",
- " <td>None</td>\n",
- " <td>C10</td>\n",
- " <td>C0603_4u7_6.3Vdc_X5R</td>\n",
- " <td>C</td>\n",
- " <td>10</td>\n",
- " <td></td>\n",
- " </tr>\n",
- " <tr>\n",
- " <th>C11</th>\n",
- " <td>4.7uF</td>\n",
- " <td>None</td>\n",
- " <td>4.7uF, 6.3Vdc, ±20%, X5R</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>Murata</td>\n",
- " <td>GRM185R60J475ME15</td>\n",
- " <td>None</td>\n",
- " <td>C11</td>\n",
- " <td>C0603_4u7_6.3Vdc_X5R</td>\n",
- " <td>C</td>\n",
- " <td>11</td>\n",
- " <td></td>\n",
- " </tr>\n",
- " <tr>\n",
- " <th>C12</th>\n",
- " <td>4.7uF</td>\n",
- " <td>None</td>\n",
- " <td>4.7uF, 6.3Vdc, ±20%, X5R</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>Murata</td>\n",
- " <td>GRM185R60J475ME15</td>\n",
- " <td>None</td>\n",
- " <td>C12</td>\n",
- " <td>C0603_4u7_6.3Vdc_X5R</td>\n",
- " <td>C</td>\n",
- " <td>12</td>\n",
- " <td></td>\n",
- " </tr>\n",
- " <tr>\n",
- " <th>C13</th>\n",
- " <td>1.0uF</td>\n",
- " <td>None</td>\n",
- " <td>1.0uF, 10Vdc, ±20%, X5R</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>Murata</td>\n",
- " <td>GRM153R61A105ME95</td>\n",
- " <td>None</td>\n",
- " <td>C13</td>\n",
- " <td>C0402_1u_10Vdc_X5R</td>\n",
- " <td>C</td>\n",
- " <td>13</td>\n",
- " <td></td>\n",
- " </tr>\n",
- " <tr>\n",
- " <th>C14</th>\n",
- " <td>1.0uF</td>\n",
- " <td>None</td>\n",
- " <td>1.0uF, 10Vdc, ±20%, X5R</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>Murata</td>\n",
- " <td>GRM153R61A105ME95</td>\n",
- " <td>None</td>\n",
- " <td>C14</td>\n",
- " <td>C0402_1u_10Vdc_X5R</td>\n",
- " <td>C</td>\n",
- " <td>14</td>\n",
- " <td></td>\n",
- " </tr>\n",
- " <tr>\n",
- " <th>C15</th>\n",
- " <td>10000pF</td>\n",
- " <td>None</td>\n",
- " <td>10000pF, 10Vdc, ±10%, X5R</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>Murata</td>\n",
- " <td>GRM155R61A103KA01</td>\n",
- " <td>None</td>\n",
- " <td>C15</td>\n",
- " <td>C0402_10n_10Vdc_X5R</td>\n",
- " <td>C</td>\n",
- " <td>15</td>\n",
- " <td></td>\n",
- " </tr>\n",
- " <tr>\n",
- " <th>C16</th>\n",
- " <td>10000pF</td>\n",
- " <td>None</td>\n",
- " <td>10000pF, 10Vdc, ±10%, X5R</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>Murata</td>\n",
- " <td>GRM155R61A103KA01</td>\n",
- " <td>None</td>\n",
- " <td>C16</td>\n",
- " <td>C0402_10n_10Vdc_X5R</td>\n",
- " <td>C</td>\n",
- " <td>16</td>\n",
- " <td></td>\n",
- " </tr>\n",
- " <tr>\n",
- " <th>C17</th>\n",
- " <td>10000pF</td>\n",
- " <td>None</td>\n",
- " <td>10000pF, 10Vdc, ±10%, X5R</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>Murata</td>\n",
- " <td>GRM155R61A103KA01</td>\n",
- " <td>None</td>\n",
- " <td>C17</td>\n",
- " <td>C0402_10n_10Vdc_X5R</td>\n",
- " <td>C</td>\n",
- " <td>17</td>\n",
- " <td></td>\n",
- " </tr>\n",
- " <tr>\n",
- " <th>C18</th>\n",
- " <td>1.0uF</td>\n",
- " <td>None</td>\n",
- " <td>1.0uF, 10Vdc, ±20%, X5R</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>Murata</td>\n",
- " <td>GRM153R61A105ME95</td>\n",
- " <td>None</td>\n",
- " <td>C18</td>\n",
- " <td>C0402_1u_10Vdc_X5R</td>\n",
- " <td>C</td>\n",
- " <td>18</td>\n",
- " <td></td>\n",
- " </tr>\n",
- " <tr>\n",
- " <th>C19</th>\n",
- " <td>1.0uF</td>\n",
- " <td>None</td>\n",
- " <td>1.0uF, 10Vdc, ±20%, X5R</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>Murata</td>\n",
- " <td>GRM153R61A105ME95</td>\n",
- " <td>None</td>\n",
- " <td>C19</td>\n",
- " <td>C0402_1u_10Vdc_X5R</td>\n",
- " <td>C</td>\n",
- " <td>19</td>\n",
- " <td></td>\n",
- " </tr>\n",
- " <tr>\n",
- " <th>C20</th>\n",
- " <td>1.0uF</td>\n",
- " <td>None</td>\n",
- " <td>1.0uF, 10Vdc, ±20%, X5R</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>Murata</td>\n",
- " <td>GRM153R61A105ME95</td>\n",
- " <td>None</td>\n",
- " <td>C20</td>\n",
- " <td>C0402_1u_10Vdc_X5R</td>\n",
- " <td>C</td>\n",
- " <td>20</td>\n",
- " <td></td>\n",
- " </tr>\n",
- " <tr>\n",
- " <th>C21</th>\n",
- " <td>1.0uF</td>\n",
- " <td>None</td>\n",
- " <td>1.0uF, 10Vdc, ±20%, X5R</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>Murata</td>\n",
- " <td>GRM153R61A105ME95</td>\n",
- " <td>None</td>\n",
- " <td>C21</td>\n",
- " <td>C0402_1u_10Vdc_X5R</td>\n",
- " <td>C</td>\n",
- " <td>21</td>\n",
- " <td></td>\n",
- " </tr>\n",
- " <tr>\n",
- " <th>C22</th>\n",
- " <td>10pF</td>\n",
- " <td>None</td>\n",
- " <td>10pF, 100Vdc, ±2%, C0G</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>Murata</td>\n",
- " <td>GRM1555C2A100GA01</td>\n",
- " <td>None</td>\n",
- " <td>C22</td>\n",
- " <td>C0402_10p_100Vdc_C0G</td>\n",
- " <td>C</td>\n",
- " <td>22</td>\n",
- " <td></td>\n",
- " </tr>\n",
- " <tr>\n",
- " <th>C23</th>\n",
- " <td>10pF</td>\n",
- " <td>None</td>\n",
- " <td>10pF, 100Vdc, ±2%, C0G</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>Murata</td>\n",
- " <td>GRM1555C2A100GA01</td>\n",
- " <td>None</td>\n",
- " <td>C23</td>\n",
- " <td>C0402_10p_100Vdc_C0G</td>\n",
- " <td>C</td>\n",
- " <td>23</td>\n",
- " <td></td>\n",
- " </tr>\n",
- " <tr>\n",
- " <th>C24</th>\n",
- " <td>10pF</td>\n",
- " <td>None</td>\n",
- " <td>10pF, 100Vdc, ±2%, C0G</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>Murata</td>\n",
- " <td>GRM1555C2A100GA01</td>\n",
- " <td>None</td>\n",
- " <td>C24</td>\n",
- " <td>C0402_10p_100Vdc_C0G</td>\n",
- " <td>C</td>\n",
- " <td>24</td>\n",
- " <td></td>\n",
- " </tr>\n",
- " <tr>\n",
- " <th>C25</th>\n",
- " <td>10pF</td>\n",
- " <td>None</td>\n",
- " <td>10pF, 100Vdc, ±2%, C0G</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>Murata</td>\n",
- " <td>GRM1555C2A100GA01</td>\n",
- " <td>None</td>\n",
- " <td>C25</td>\n",
- " <td>C0402_10p_100Vdc_C0G</td>\n",
- " <td>C</td>\n",
- " <td>25</td>\n",
- " <td></td>\n",
- " </tr>\n",
- " <tr>\n",
- " <th>C26</th>\n",
- " <td>10pF</td>\n",
- " <td>None</td>\n",
- " <td>10pF, 100Vdc, ±2%, C0G</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>Murata</td>\n",
- " <td>GRM1555C2A100GA01</td>\n",
- " <td>None</td>\n",
- " <td>C26</td>\n",
- " <td>C0402_10p_100Vdc_C0G</td>\n",
- " <td>C</td>\n",
- " <td>26</td>\n",
- " <td></td>\n",
- " </tr>\n",
- " <tr>\n",
- " <th>C27</th>\n",
- " <td>1.0uF</td>\n",
- " <td>None</td>\n",
- " <td>1.0uF, 10Vdc, ±20%, X5R</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>Murata</td>\n",
- " <td>GRM153R61A105ME95</td>\n",
- " <td>None</td>\n",
- " <td>C27</td>\n",
- " <td>C0402_1u_10Vdc_X5R</td>\n",
- " <td>C</td>\n",
- " <td>27</td>\n",
- " <td></td>\n",
- " </tr>\n",
- " <tr>\n",
- " <th>C28</th>\n",
- " <td>15pF</td>\n",
- " <td>None</td>\n",
- " <td>15pF, 100Vdc, ±2%, C0G</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>Murata</td>\n",
- " <td>GRM1555C2A150GA01</td>\n",
- " <td>None</td>\n",
- " <td>C28</td>\n",
- " <td>C0402_15p_100Vdc_C0G</td>\n",
- " <td>C</td>\n",
- " <td>28</td>\n",
- " <td></td>\n",
- " </tr>\n",
- " <tr>\n",
- " <th>C29</th>\n",
- " <td>1.0uF</td>\n",
- " <td>None</td>\n",
- " <td>1.0uF, 10Vdc, ±20%, X5R</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>Murata</td>\n",
- " <td>GRM153R61A105ME95</td>\n",
- " <td>None</td>\n",
- " <td>C29</td>\n",
- " <td>C0402_1u_10Vdc_X5R</td>\n",
- " <td>C</td>\n",
- " <td>29</td>\n",
- " <td></td>\n",
- " </tr>\n",
- " <tr>\n",
- " <th>C30</th>\n",
- " <td>15pF</td>\n",
- " <td>None</td>\n",
- " <td>15pF, 100Vdc, ±2%, C0G</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>Murata</td>\n",
- " <td>GRM1555C2A150GA01</td>\n",
- " <td>None</td>\n",
- " <td>C30</td>\n",
- " <td>C0402_15p_100Vdc_C0G</td>\n",
- " <td>C</td>\n",
- " <td>30</td>\n",
- " <td></td>\n",
- " </tr>\n",
- " <tr>\n",
- " <th>...</th>\n",
- " <td>...</td>\n",
- " <td>...</td>\n",
- " <td>...</td>\n",
- " <td>...</td>\n",
- " <td>...</td>\n",
- " <td>...</td>\n",
- " <td>...</td>\n",
- " <td>...</td>\n",
- " <td>...</td>\n",
- " <td>...</td>\n",
- " <td>...</td>\n",
- " <td>...</td>\n",
- " <td>...</td>\n",
- " <td>...</td>\n",
- " </tr>\n",
- " <tr>\n",
- " <th>R32</th>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>1.5k, ±1%, 0.063W</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>Vishay</td>\n",
- " <td>CRCW04021K50FKED</td>\n",
- " <td>1.5k</td>\n",
- " <td>R32</td>\n",
- " <td>R0402_1k50</td>\n",
- " <td>R</td>\n",
- " <td>32</td>\n",
- " <td></td>\n",
- " </tr>\n",
- " <tr>\n",
- " <th>R33</th>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>10k, ±1%, 0.063W</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>Vishay</td>\n",
- " <td>CRCW040210K0FKED</td>\n",
- " <td>10k</td>\n",
- " <td>R33</td>\n",
- " <td>R0402_10k</td>\n",
- " <td>R</td>\n",
- " <td>33</td>\n",
- " <td></td>\n",
- " </tr>\n",
- " <tr>\n",
- " <th>R34</th>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>330, ±1%, 0.063W</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>Vishay</td>\n",
- " <td>CRCW0402330RFKED</td>\n",
- " <td>330</td>\n",
- " <td>R34</td>\n",
- " <td>R0402_330R</td>\n",
- " <td>R</td>\n",
- " <td>34</td>\n",
- " <td></td>\n",
- " </tr>\n",
- " <tr>\n",
- " <th>R35</th>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>330, ±1%, 0.063W</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>Vishay</td>\n",
- " <td>CRCW0402330RFKED</td>\n",
- " <td>330</td>\n",
- " <td>R35</td>\n",
- " <td>R0402_330R</td>\n",
- " <td>R</td>\n",
- " <td>35</td>\n",
- " <td></td>\n",
- " </tr>\n",
- " <tr>\n",
- " <th>R36</th>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>10k, ±1%, 0.063W</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>Vishay</td>\n",
- " <td>CRCW040210K0FKED</td>\n",
- " <td>10k</td>\n",
- " <td>R36</td>\n",
- " <td>R0402_10k</td>\n",
- " <td>R</td>\n",
- " <td>36</td>\n",
- " <td></td>\n",
- " </tr>\n",
- " <tr>\n",
- " <th>R37</th>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>100k, ±1%, 0.063W</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>Vishay</td>\n",
- " <td>CRCW0402100KFKED</td>\n",
- " <td>100k</td>\n",
- " <td>R37</td>\n",
- " <td>R0402_100k</td>\n",
- " <td>R</td>\n",
- " <td>37</td>\n",
- " <td></td>\n",
- " </tr>\n",
- " <tr>\n",
- " <th>R38</th>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>100k, ±1%, 0.063W</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>Vishay</td>\n",
- " <td>CRCW0402100KFKED</td>\n",
- " <td>100k</td>\n",
- " <td>R38</td>\n",
- " <td>R0402_100k</td>\n",
- " <td>R</td>\n",
- " <td>38</td>\n",
- " <td></td>\n",
- " </tr>\n",
- " <tr>\n",
- " <th>R39</th>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>100k, ±1%, 0.063W</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>Vishay</td>\n",
- " <td>CRCW0402100KFKED</td>\n",
- " <td>100k</td>\n",
- " <td>R39</td>\n",
- " <td>R0402_100k</td>\n",
- " <td>R</td>\n",
- " <td>39</td>\n",
- " <td></td>\n",
- " </tr>\n",
- " <tr>\n",
- " <th>R40</th>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>100, ±1%, 0.063W</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>Vishay</td>\n",
- " <td>CRCW0402100RFKED</td>\n",
- " <td>100</td>\n",
- " <td>R40</td>\n",
- " <td>R0402_100R</td>\n",
- " <td>R</td>\n",
- " <td>40</td>\n",
- " <td></td>\n",
- " </tr>\n",
- " <tr>\n",
- " <th>R41</th>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>100, ±1%, 0.063W</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>Vishay</td>\n",
- " <td>CRCW0402100RFKED</td>\n",
- " <td>100</td>\n",
- " <td>R41</td>\n",
- " <td>R0402_100R</td>\n",
- " <td>R</td>\n",
- " <td>41</td>\n",
- " <td></td>\n",
- " </tr>\n",
- " <tr>\n",
- " <th>R42</th>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>39, ±1%, 0.063W</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>Vishay</td>\n",
- " <td>CRCW040239R0FKED</td>\n",
- " <td>39</td>\n",
- " <td>R42</td>\n",
- " <td>R0402_39R</td>\n",
- " <td>R</td>\n",
- " <td>42</td>\n",
- " <td></td>\n",
- " </tr>\n",
- " <tr>\n",
- " <th>R43</th>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>39, ±1%, 0.063W</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>Vishay</td>\n",
- " <td>CRCW040239R0FKED</td>\n",
- " <td>39</td>\n",
- " <td>R43</td>\n",
- " <td>R0402_39R</td>\n",
- " <td>R</td>\n",
- " <td>43</td>\n",
- " <td></td>\n",
- " </tr>\n",
- " <tr>\n",
- " <th>R44</th>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>10k, ±1%, 0.063W</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>Vishay</td>\n",
- " <td>CRCW040210K0FKED</td>\n",
- " <td>10k</td>\n",
- " <td>R44</td>\n",
- " <td>R0402_10k</td>\n",
- " <td>R</td>\n",
- " <td>44</td>\n",
- " <td></td>\n",
- " </tr>\n",
- " <tr>\n",
- " <th>T1</th>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>T1</td>\n",
- " <td>S558-5999-T7-F</td>\n",
- " <td>T</td>\n",
- " <td>1</td>\n",
- " <td></td>\n",
- " </tr>\n",
- " <tr>\n",
- " <th>U1</th>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>U1</td>\n",
- " <td>AT91SAM9G25</td>\n",
- " <td>U</td>\n",
- " <td>1</td>\n",
- " <td></td>\n",
- " </tr>\n",
- " <tr>\n",
- " <th>U2</th>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>U2</td>\n",
- " <td>USBLC6-4</td>\n",
- " <td>U</td>\n",
- " <td>2</td>\n",
- " <td></td>\n",
- " </tr>\n",
- " <tr>\n",
- " <th>U3</th>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>U3</td>\n",
- " <td>CC2520</td>\n",
- " <td>U</td>\n",
- " <td>3</td>\n",
- " <td></td>\n",
- " </tr>\n",
- " <tr>\n",
- " <th>U4</th>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>U4</td>\n",
- " <td>NCP360SNAET1G</td>\n",
- " <td>U</td>\n",
- " <td>4</td>\n",
- " <td></td>\n",
- " </tr>\n",
- " <tr>\n",
- " <th>U5</th>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>U5</td>\n",
- " <td>TPS62742</td>\n",
- " <td>U</td>\n",
- " <td>5</td>\n",
- " <td></td>\n",
- " </tr>\n",
- " <tr>\n",
- " <th>U6</th>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>U6</td>\n",
- " <td>MIC23254</td>\n",
- " <td>U</td>\n",
- " <td>6</td>\n",
- " <td></td>\n",
- " </tr>\n",
- " <tr>\n",
- " <th>U7</th>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>U7</td>\n",
- " <td>IS46DR16640B</td>\n",
- " <td>U</td>\n",
- " <td>7</td>\n",
- " <td></td>\n",
- " </tr>\n",
- " <tr>\n",
- " <th>U8</th>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>U8</td>\n",
- " <td>MX30LF1G08AA</td>\n",
- " <td>U</td>\n",
- " <td>8</td>\n",
- " <td></td>\n",
- " </tr>\n",
- " <tr>\n",
- " <th>U9</th>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>U9</td>\n",
- " <td>LAN8710</td>\n",
- " <td>U</td>\n",
- " <td>9</td>\n",
- " <td></td>\n",
- " </tr>\n",
- " <tr>\n",
- " <th>U10</th>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>U10</td>\n",
- " <td>USBLC6-4</td>\n",
- " <td>U</td>\n",
- " <td>10</td>\n",
- " <td></td>\n",
- " </tr>\n",
- " <tr>\n",
- " <th>U11</th>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>U11</td>\n",
- " <td>LP3470M5-3.08</td>\n",
- " <td>U</td>\n",
- " <td>11</td>\n",
- " <td></td>\n",
- " </tr>\n",
- " <tr>\n",
- " <th>X1</th>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>f=12MHz, Stability:±150ppm, Tol:±50ppm,Load ca...</td>\n",
- " <td>12MHz</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>NDK</td>\n",
- " <td>NX3225GA-12.000M-STD-CRA-1</td>\n",
- " <td>None</td>\n",
- " <td>X1</td>\n",
- " <td>NX3225GA-12.000M-STD-CRA-1</td>\n",
- " <td>X</td>\n",
- " <td>1</td>\n",
- " <td></td>\n",
- " </tr>\n",
- " <tr>\n",
- " <th>X2</th>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>f=32.768kHz, Stability:-, Tol:±20ppm,Load capa...</td>\n",
- " <td>32.768kHz</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>NDK</td>\n",
- " <td>NX2012SA-32.768K-STD-MUB-1</td>\n",
- " <td>None</td>\n",
- " <td>X2</td>\n",
- " <td>NX2012SA-32.768K-STD-MUB-1</td>\n",
- " <td>X</td>\n",
- " <td>2</td>\n",
- " <td></td>\n",
- " </tr>\n",
- " <tr>\n",
- " <th>X3</th>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>f=32MHz, Stability:±10ppm, Tol:±10ppm,Load cap...</td>\n",
- " <td>32MHz</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>NDK</td>\n",
- " <td>NX2520SA-32.000000MHZ</td>\n",
- " <td>None</td>\n",
- " <td>X3</td>\n",
- " <td>NX2520SA-32.000000MHZ</td>\n",
- " <td>X</td>\n",
- " <td>3</td>\n",
- " <td></td>\n",
- " </tr>\n",
- " <tr>\n",
- " <th>X4</th>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>f=25MHz, Stability:±25ppm, Tol:±15ppm,Load cap...</td>\n",
- " <td>25MHz</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>NDK</td>\n",
- " <td>NX2520SA-25.000M-STD-CSW-5</td>\n",
- " <td>None</td>\n",
- " <td>X4</td>\n",
- " <td>NX2520SA-25.000M-STD-CSW-5</td>\n",
- " <td>X</td>\n",
- " <td>4</td>\n",
- " <td></td>\n",
- " </tr>\n",
- " <tr>\n",
- " <th>Z1</th>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>None</td>\n",
- " <td>Z1</td>\n",
- " <td>WLA.01</td>\n",
- " <td>Z</td>\n",
- " <td>1</td>\n",
- " <td></td>\n",
- " </tr>\n",
- " </tbody>\n",
- "</table>\n",
- "<p>165 rows × 14 columns</p>\n",
- "</div>"
- ],
- "text/plain": [
- " Capacitance Color Description \\\n",
- "C1 1.0uF None 1.0uF, 10Vdc, ±20%, X5R \n",
- "C2 1.0uF None 1.0uF, 10Vdc, ±20%, X5R \n",
- "C3 1.0uF None 1.0uF, 10Vdc, ±20%, X5R \n",
- "C4 1.0uF None 1.0uF, 10Vdc, ±20%, X5R \n",
- "C5 1.0uF None 1.0uF, 10Vdc, ±20%, X5R \n",
- "C6 1.0uF None 1.0uF, 10Vdc, ±20%, X5R \n",
- "C7 1.0uF None 1.0uF, 10Vdc, ±20%, X5R \n",
- "C8 1.0uF None 1.0uF, 10Vdc, ±20%, X5R \n",
- "C9 1.0uF None 1.0uF, 10Vdc, ±20%, X5R \n",
- "C10 4.7uF None 4.7uF, 6.3Vdc, ±20%, X5R \n",
- "C11 4.7uF None 4.7uF, 6.3Vdc, ±20%, X5R \n",
- "C12 4.7uF None 4.7uF, 6.3Vdc, ±20%, X5R \n",
- "C13 1.0uF None 1.0uF, 10Vdc, ±20%, X5R \n",
- "C14 1.0uF None 1.0uF, 10Vdc, ±20%, X5R \n",
- "C15 10000pF None 10000pF, 10Vdc, ±10%, X5R \n",
- "C16 10000pF None 10000pF, 10Vdc, ±10%, X5R \n",
- "C17 10000pF None 10000pF, 10Vdc, ±10%, X5R \n",
- "C18 1.0uF None 1.0uF, 10Vdc, ±20%, X5R \n",
- "C19 1.0uF None 1.0uF, 10Vdc, ±20%, X5R \n",
- "C20 1.0uF None 1.0uF, 10Vdc, ±20%, X5R \n",
- "C21 1.0uF None 1.0uF, 10Vdc, ±20%, X5R \n",
- "C22 10pF None 10pF, 100Vdc, ±2%, C0G \n",
- "C23 10pF None 10pF, 100Vdc, ±2%, C0G \n",
- "C24 10pF None 10pF, 100Vdc, ±2%, C0G \n",
- "C25 10pF None 10pF, 100Vdc, ±2%, C0G \n",
- "C26 10pF None 10pF, 100Vdc, ±2%, C0G \n",
- "C27 1.0uF None 1.0uF, 10Vdc, ±20%, X5R \n",
- "C28 15pF None 15pF, 100Vdc, ±2%, C0G \n",
- "C29 1.0uF None 1.0uF, 10Vdc, ±20%, X5R \n",
- "C30 15pF None 15pF, 100Vdc, ±2%, C0G \n",
- ".. ... ... ... \n",
- "R32 None None 1.5k, ±1%, 0.063W \n",
- "R33 None None 10k, ±1%, 0.063W \n",
- "R34 None None 330, ±1%, 0.063W \n",
- "R35 None None 330, ±1%, 0.063W \n",
- "R36 None None 10k, ±1%, 0.063W \n",
- "R37 None None 100k, ±1%, 0.063W \n",
- "R38 None None 100k, ±1%, 0.063W \n",
- "R39 None None 100k, ±1%, 0.063W \n",
- "R40 None None 100, ±1%, 0.063W \n",
- "R41 None None 100, ±1%, 0.063W \n",
- "R42 None None 39, ±1%, 0.063W \n",
- "R43 None None 39, ±1%, 0.063W \n",
- "R44 None None 10k, ±1%, 0.063W \n",
- "T1 None None None \n",
- "U1 None None None \n",
- "U2 None None None \n",
- "U3 None None None \n",
- "U4 None None None \n",
- "U5 None None None \n",
- "U6 None None None \n",
- "U7 None None None \n",
- "U8 None None None \n",
- "U9 None None None \n",
- "U10 None None None \n",
- "U11 None None None \n",
- "X1 None None f=12MHz, Stability:±150ppm, Tol:±50ppm,Load ca... \n",
- "X2 None None f=32.768kHz, Stability:-, Tol:±20ppm,Load capa... \n",
- "X3 None None f=32MHz, Stability:±10ppm, Tol:±10ppm,Load cap... \n",
- "X4 None None f=25MHz, Stability:±25ppm, Tol:±15ppm,Load cap... \n",
- "Z1 None None None \n",
- "\n",
- " Frequency Impedance Inductance Manufacturer Part Number \\\n",
- "C1 None None None Murata GRM153R61A105ME95 \n",
- "C2 None None None Murata GRM153R61A105ME95 \n",
- "C3 None None None Murata GRM153R61A105ME95 \n",
- "C4 None None None Murata GRM153R61A105ME95 \n",
- "C5 None None None Murata GRM153R61A105ME95 \n",
- "C6 None None None Murata GRM153R61A105ME95 \n",
- "C7 None None None Murata GRM153R61A105ME95 \n",
- "C8 None None None Murata GRM153R61A105ME95 \n",
- "C9 None None None Murata GRM153R61A105ME95 \n",
- "C10 None None None Murata GRM185R60J475ME15 \n",
- "C11 None None None Murata GRM185R60J475ME15 \n",
- "C12 None None None Murata GRM185R60J475ME15 \n",
- "C13 None None None Murata GRM153R61A105ME95 \n",
- "C14 None None None Murata GRM153R61A105ME95 \n",
- "C15 None None None Murata GRM155R61A103KA01 \n",
- "C16 None None None Murata GRM155R61A103KA01 \n",
- "C17 None None None Murata GRM155R61A103KA01 \n",
- "C18 None None None Murata GRM153R61A105ME95 \n",
- "C19 None None None Murata GRM153R61A105ME95 \n",
- "C20 None None None Murata GRM153R61A105ME95 \n",
- "C21 None None None Murata GRM153R61A105ME95 \n",
- "C22 None None None Murata GRM1555C2A100GA01 \n",
- "C23 None None None Murata GRM1555C2A100GA01 \n",
- "C24 None None None Murata GRM1555C2A100GA01 \n",
- "C25 None None None Murata GRM1555C2A100GA01 \n",
- "C26 None None None Murata GRM1555C2A100GA01 \n",
- "C27 None None None Murata GRM153R61A105ME95 \n",
- "C28 None None None Murata GRM1555C2A150GA01 \n",
- "C29 None None None Murata GRM153R61A105ME95 \n",
- "C30 None None None Murata GRM1555C2A150GA01 \n",
- ".. ... ... ... ... ... \n",
- "R32 None None None Vishay CRCW04021K50FKED \n",
- "R33 None None None Vishay CRCW040210K0FKED \n",
- "R34 None None None Vishay CRCW0402330RFKED \n",
- "R35 None None None Vishay CRCW0402330RFKED \n",
- "R36 None None None Vishay CRCW040210K0FKED \n",
- "R37 None None None Vishay CRCW0402100KFKED \n",
- "R38 None None None Vishay CRCW0402100KFKED \n",
- "R39 None None None Vishay CRCW0402100KFKED \n",
- "R40 None None None Vishay CRCW0402100RFKED \n",
- "R41 None None None Vishay CRCW0402100RFKED \n",
- "R42 None None None Vishay CRCW040239R0FKED \n",
- "R43 None None None Vishay CRCW040239R0FKED \n",
- "R44 None None None Vishay CRCW040210K0FKED \n",
- "T1 None None None None None \n",
- "U1 None None None None None \n",
- "U2 None None None None None \n",
- "U3 None None None None None \n",
- "U4 None None None None None \n",
- "U5 None None None None None \n",
- "U6 None None None None None \n",
- "U7 None None None None None \n",
- "U8 None None None None None \n",
- "U9 None None None None None \n",
- "U10 None None None None None \n",
- "U11 None None None None None \n",
- "X1 12MHz None None NDK NX3225GA-12.000M-STD-CRA-1 \n",
- "X2 32.768kHz None None NDK NX2012SA-32.768K-STD-MUB-1 \n",
- "X3 32MHz None None NDK NX2520SA-32.000000MHZ \n",
- "X4 25MHz None None NDK NX2520SA-25.000M-STD-CSW-5 \n",
- "Z1 None None None None None \n",
- "\n",
- " Resistance ref value ref_name ref_num ref_rest \n",
- "C1 None C1 C0402_1u_10Vdc_X5R C 1 \n",
- "C2 None C2 C0402_1u_10Vdc_X5R C 2 \n",
- "C3 None C3 C0402_1u_10Vdc_X5R C 3 \n",
- "C4 None C4 C0402_1u_10Vdc_X5R C 4 \n",
- "C5 None C5 C0402_1u_10Vdc_X5R C 5 \n",
- "C6 None C6 C0402_1u_10Vdc_X5R C 6 \n",
- "C7 None C7 C0402_1u_10Vdc_X5R C 7 \n",
- "C8 None C8 C0402_1u_10Vdc_X5R C 8 \n",
- "C9 None C9 C0402_1u_10Vdc_X5R C 9 \n",
- "C10 None C10 C0603_4u7_6.3Vdc_X5R C 10 \n",
- "C11 None C11 C0603_4u7_6.3Vdc_X5R C 11 \n",
- "C12 None C12 C0603_4u7_6.3Vdc_X5R C 12 \n",
- "C13 None C13 C0402_1u_10Vdc_X5R C 13 \n",
- "C14 None C14 C0402_1u_10Vdc_X5R C 14 \n",
- "C15 None C15 C0402_10n_10Vdc_X5R C 15 \n",
- "C16 None C16 C0402_10n_10Vdc_X5R C 16 \n",
- "C17 None C17 C0402_10n_10Vdc_X5R C 17 \n",
- "C18 None C18 C0402_1u_10Vdc_X5R C 18 \n",
- "C19 None C19 C0402_1u_10Vdc_X5R C 19 \n",
- "C20 None C20 C0402_1u_10Vdc_X5R C 20 \n",
- "C21 None C21 C0402_1u_10Vdc_X5R C 21 \n",
- "C22 None C22 C0402_10p_100Vdc_C0G C 22 \n",
- "C23 None C23 C0402_10p_100Vdc_C0G C 23 \n",
- "C24 None C24 C0402_10p_100Vdc_C0G C 24 \n",
- "C25 None C25 C0402_10p_100Vdc_C0G C 25 \n",
- "C26 None C26 C0402_10p_100Vdc_C0G C 26 \n",
- "C27 None C27 C0402_1u_10Vdc_X5R C 27 \n",
- "C28 None C28 C0402_15p_100Vdc_C0G C 28 \n",
- "C29 None C29 C0402_1u_10Vdc_X5R C 29 \n",
- "C30 None C30 C0402_15p_100Vdc_C0G C 30 \n",
- ".. ... ... ... ... ... ... \n",
- "R32 1.5k R32 R0402_1k50 R 32 \n",
- "R33 10k R33 R0402_10k R 33 \n",
- "R34 330 R34 R0402_330R R 34 \n",
- "R35 330 R35 R0402_330R R 35 \n",
- "R36 10k R36 R0402_10k R 36 \n",
- "R37 100k R37 R0402_100k R 37 \n",
- "R38 100k R38 R0402_100k R 38 \n",
- "R39 100k R39 R0402_100k R 39 \n",
- "R40 100 R40 R0402_100R R 40 \n",
- "R41 100 R41 R0402_100R R 41 \n",
- "R42 39 R42 R0402_39R R 42 \n",
- "R43 39 R43 R0402_39R R 43 \n",
- "R44 10k R44 R0402_10k R 44 \n",
- "T1 None T1 S558-5999-T7-F T 1 \n",
- "U1 None U1 AT91SAM9G25 U 1 \n",
- "U2 None U2 USBLC6-4 U 2 \n",
- "U3 None U3 CC2520 U 3 \n",
- "U4 None U4 NCP360SNAET1G U 4 \n",
- "U5 None U5 TPS62742 U 5 \n",
- "U6 None U6 MIC23254 U 6 \n",
- "U7 None U7 IS46DR16640B U 7 \n",
- "U8 None U8 MX30LF1G08AA U 8 \n",
- "U9 None U9 LAN8710 U 9 \n",
- "U10 None U10 USBLC6-4 U 10 \n",
- "U11 None U11 LP3470M5-3.08 U 11 \n",
- "X1 None X1 NX3225GA-12.000M-STD-CRA-1 X 1 \n",
- "X2 None X2 NX2012SA-32.768K-STD-MUB-1 X 2 \n",
- "X3 None X3 NX2520SA-32.000000MHZ X 3 \n",
- "X4 None X4 NX2520SA-25.000M-STD-CSW-5 X 4 \n",
- "Z1 None Z1 WLA.01 Z 1 \n",
- "\n",
- "[165 rows x 14 columns]"
- ]
- },
- "execution_count": 201,
- "metadata": {},
- "output_type": "execute_result"
- }
- ],
- "source": [
- "bom"
- ]
- }
- ],
- "metadata": {
- "kernelspec": {
- "display_name": "Python 3",
- "language": "python",
- "name": "python3"
- },
- "language_info": {
- "codemirror_mode": {
- "name": "ipython",
- "version": 3
- },
- "file_extension": ".py",
- "mimetype": "text/x-python",
- "name": "python",
- "nbconvert_exporter": "python",
- "pygments_lexer": "ipython3",
- "version": "3.5.4rc1"
- }
- },
- "nbformat": 4,
- "nbformat_minor": 2
-}
diff --git a/demo/notebooks/bad-bom.ipynb b/demo/notebooks/bad-bom.ipynb
new file mode 100644
index 0000000..e84de79
--- /dev/null
+++ b/demo/notebooks/bad-bom.ipynb
@@ -0,0 +1,437 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "### Notebook configuration"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 248,
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The autoreload extension is already loaded. To reload it, use:\n",
+ " %reload_ext autoreload\n"
+ ]
+ },
+ {
+ "name": "stderr",
+ "output_type": "stream",
+ "text": [
+ "[autoreload of ee failed: Traceback (most recent call last):\n",
+ " File \"/home/trygvis/dev/io.trygvis/2017/07/ee-python/env-python3/lib/python3.5/site-packages/IPython/extensions/autoreload.py\", line 246, in check\n",
+ " superreload(m, reload, self.old_objects)\n",
+ " File \"/home/trygvis/dev/io.trygvis/2017/07/ee-python/env-python3/lib/python3.5/site-packages/IPython/extensions/autoreload.py\", line 369, in superreload\n",
+ " module = reload(module)\n",
+ " File \"/home/trygvis/dev/io.trygvis/2017/07/ee-python/env-python3/lib/python3.5/imp.py\", line 315, in reload\n",
+ " return importlib.reload(module)\n",
+ " File \"/home/trygvis/dev/io.trygvis/2017/07/ee-python/env-python3/lib/python3.5/importlib/__init__.py\", line 166, in reload\n",
+ " _bootstrap._exec(spec, module)\n",
+ " File \"<frozen importlib._bootstrap>\", line 626, in _exec\n",
+ " File \"<frozen importlib._bootstrap_external>\", line 697, in exec_module\n",
+ " File \"<frozen importlib._bootstrap>\", line 222, in _call_with_frames_removed\n",
+ " File \"/home/trygvis/dev/io.trygvis/2017/07/ee-python/src/ee/__init__.py\", line 43, in <module>\n",
+ " EeVal.r = re.compile(\"([0-9]+)( *)([\" + join(EeVal.exponents.keys()) + \"])\")\n",
+ "NameError: name 'join' is not defined\n",
+ "]\n",
+ "[autoreload of ee failed: Traceback (most recent call last):\n",
+ " File \"/home/trygvis/dev/io.trygvis/2017/07/ee-python/env-python3/lib/python3.5/site-packages/IPython/extensions/autoreload.py\", line 246, in check\n",
+ " superreload(m, reload, self.old_objects)\n",
+ " File \"/home/trygvis/dev/io.trygvis/2017/07/ee-python/env-python3/lib/python3.5/site-packages/IPython/extensions/autoreload.py\", line 369, in superreload\n",
+ " module = reload(module)\n",
+ " File \"/home/trygvis/dev/io.trygvis/2017/07/ee-python/env-python3/lib/python3.5/imp.py\", line 315, in reload\n",
+ " return importlib.reload(module)\n",
+ " File \"/home/trygvis/dev/io.trygvis/2017/07/ee-python/env-python3/lib/python3.5/importlib/__init__.py\", line 166, in reload\n",
+ " _bootstrap._exec(spec, module)\n",
+ " File \"<frozen importlib._bootstrap>\", line 626, in _exec\n",
+ " File \"<frozen importlib._bootstrap_external>\", line 697, in exec_module\n",
+ " File \"<frozen importlib._bootstrap>\", line 222, in _call_with_frames_removed\n",
+ " File \"/home/trygvis/dev/io.trygvis/2017/07/ee-python/src/ee/__init__.py\", line 43, in <module>\n",
+ " EeVal.r = re.compile(\"([0-9]+)( *)([\" + join(EeVal.exponents.keys()) + \"])\")\n",
+ "NameError: name 'join' is not defined\n",
+ "]\n"
+ ]
+ },
+ {
+ "ename": "NameError",
+ "evalue": "name 'EeVal' is not defined",
+ "output_type": "error",
+ "traceback": [
+ "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
+ "\u001b[0;31mNameError\u001b[0m Traceback (most recent call last)",
+ "\u001b[0;32m<ipython-input-248-a1070d7b586a>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m()\u001b[0m\n\u001b[1;32m 9\u001b[0m \u001b[0;32mfrom\u001b[0m \u001b[0mee\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mkicad\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mbom\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0;34m*\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 10\u001b[0m \u001b[0;32mfrom\u001b[0m \u001b[0mee\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mkicad\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mbom\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mio\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mread_bom\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 11\u001b[0;31m \u001b[0mEeVal\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mr\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m",
+ "\u001b[0;31mNameError\u001b[0m: name 'EeVal' is not defined"
+ ]
+ }
+ ],
+ "source": [
+ "%load_ext autoreload\n",
+ "%autoreload 2\n",
+ "\n",
+ "%aimport ee.kicad.bom\n",
+ "%aimport ee.kicad.bom.io\n",
+ "\n",
+ "import ee\n",
+ "from ee.formatting import *\n",
+ "from ee.kicad.bom import *\n",
+ "from ee.kicad.bom.io import read_bom\n",
+ "EeVal.r"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Load the BOM"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 239,
+ "metadata": {
+ "scrolled": true
+ },
+ "outputs": [
+ {
+ "data": {
+ "text/html": [
+ "<div>\n",
+ "<style>\n",
+ " .dataframe thead tr:only-child th {\n",
+ " text-align: right;\n",
+ " }\n",
+ "\n",
+ " .dataframe thead th {\n",
+ " text-align: left;\n",
+ " }\n",
+ "\n",
+ " .dataframe tbody tr th {\n",
+ " vertical-align: top;\n",
+ " }\n",
+ "</style>\n",
+ "<table border=\"1\" class=\"dataframe\">\n",
+ " <thead>\n",
+ " <tr style=\"text-align: right;\">\n",
+ " <th></th>\n",
+ " <th>digikey</th>\n",
+ " <th>mpn</th>\n",
+ " <th>ref</th>\n",
+ " <th>value</th>\n",
+ " </tr>\n",
+ " </thead>\n",
+ " <tbody>\n",
+ " <tr>\n",
+ " <th>R1</th>\n",
+ " <td>311-1.00KFRTR-ND</td>\n",
+ " <td>RC1206FR-071KL</td>\n",
+ " <td>R1</td>\n",
+ " <td>10k</td>\n",
+ " </tr>\n",
+ " <tr>\n",
+ " <th>C4</th>\n",
+ " <td>None</td>\n",
+ " <td>None</td>\n",
+ " <td>C4</td>\n",
+ " <td>1uF</td>\n",
+ " </tr>\n",
+ " <tr>\n",
+ " <th>R2</th>\n",
+ " <td>None</td>\n",
+ " <td>None</td>\n",
+ " <td>R2</td>\n",
+ " <td>10k</td>\n",
+ " </tr>\n",
+ " <tr>\n",
+ " <th>C3</th>\n",
+ " <td>None</td>\n",
+ " <td>None</td>\n",
+ " <td>C3</td>\n",
+ " <td>100n</td>\n",
+ " </tr>\n",
+ " </tbody>\n",
+ "</table>\n",
+ "</div>"
+ ],
+ "text/plain": [
+ " digikey mpn ref value\n",
+ "R1 311-1.00KFRTR-ND RC1206FR-071KL R1 10k\n",
+ "C4 None None C4 1uF\n",
+ "R2 None None R2 10k\n",
+ "C3 None None C3 100n"
+ ]
+ },
+ "execution_count": 239,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "import os\n",
+ "import os.path\n",
+ "import pandas\n",
+ "\n",
+ "bom = read_bom(\"../kicad/bad-bom.xml\").to_pandas()\n",
+ "bom"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 244,
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stderr",
+ "output_type": "stream",
+ "text": [
+ "[autoreload of ee failed: Traceback (most recent call last):\n",
+ " File \"/home/trygvis/dev/io.trygvis/2017/07/ee-python/env-python3/lib/python3.5/site-packages/IPython/extensions/autoreload.py\", line 246, in check\n",
+ " superreload(m, reload, self.old_objects)\n",
+ " File \"/home/trygvis/dev/io.trygvis/2017/07/ee-python/env-python3/lib/python3.5/site-packages/IPython/extensions/autoreload.py\", line 369, in superreload\n",
+ " module = reload(module)\n",
+ " File \"/home/trygvis/dev/io.trygvis/2017/07/ee-python/env-python3/lib/python3.5/imp.py\", line 315, in reload\n",
+ " return importlib.reload(module)\n",
+ " File \"/home/trygvis/dev/io.trygvis/2017/07/ee-python/env-python3/lib/python3.5/importlib/__init__.py\", line 166, in reload\n",
+ " _bootstrap._exec(spec, module)\n",
+ " File \"<frozen importlib._bootstrap>\", line 626, in _exec\n",
+ " File \"<frozen importlib._bootstrap_external>\", line 697, in exec_module\n",
+ " File \"<frozen importlib._bootstrap>\", line 222, in _call_with_frames_removed\n",
+ " File \"/home/trygvis/dev/io.trygvis/2017/07/ee-python/src/ee/__init__.py\", line 42, in <module>\n",
+ " EeVal.r = re.compile(\"([0-9]+)( *)([\" + join(EeVal.exponents.keys()) + \"])\")\n",
+ "NameError: name 're' is not defined\n",
+ "]\n",
+ "[autoreload of ee failed: Traceback (most recent call last):\n",
+ " File \"/home/trygvis/dev/io.trygvis/2017/07/ee-python/env-python3/lib/python3.5/site-packages/IPython/extensions/autoreload.py\", line 246, in check\n",
+ " superreload(m, reload, self.old_objects)\n",
+ " File \"/home/trygvis/dev/io.trygvis/2017/07/ee-python/env-python3/lib/python3.5/site-packages/IPython/extensions/autoreload.py\", line 369, in superreload\n",
+ " module = reload(module)\n",
+ " File \"/home/trygvis/dev/io.trygvis/2017/07/ee-python/env-python3/lib/python3.5/imp.py\", line 315, in reload\n",
+ " return importlib.reload(module)\n",
+ " File \"/home/trygvis/dev/io.trygvis/2017/07/ee-python/env-python3/lib/python3.5/importlib/__init__.py\", line 166, in reload\n",
+ " _bootstrap._exec(spec, module)\n",
+ " File \"<frozen importlib._bootstrap>\", line 626, in _exec\n",
+ " File \"<frozen importlib._bootstrap_external>\", line 697, in exec_module\n",
+ " File \"<frozen importlib._bootstrap>\", line 222, in _call_with_frames_removed\n",
+ " File \"/home/trygvis/dev/io.trygvis/2017/07/ee-python/src/ee/__init__.py\", line 42, in <module>\n",
+ " EeVal.r = re.compile(\"([0-9]+)( *)([\" + join(EeVal.exponents.keys()) + \"])\")\n",
+ "NameError: name 're' is not defined\n",
+ "]\n"
+ ]
+ },
+ {
+ "ename": "TypeError",
+ "evalue": "exceptions must derive from BaseException",
+ "output_type": "error",
+ "traceback": [
+ "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
+ "\u001b[0;31mTypeError\u001b[0m Traceback (most recent call last)",
+ "\u001b[0;32m<ipython-input-244-5cbfacf10364>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m()\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0mbom\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;34m\"value\"\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mapply\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mee_parse\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m",
+ "\u001b[0;32m~/dev/io.trygvis/2017/07/ee-python/env-python3/lib/python3.5/site-packages/pandas/core/series.py\u001b[0m in \u001b[0;36mapply\u001b[0;34m(self, func, convert_dtype, args, **kwds)\u001b[0m\n\u001b[1;32m 2353\u001b[0m \u001b[0;32melse\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 2354\u001b[0m \u001b[0mvalues\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0masobject\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 2355\u001b[0;31m \u001b[0mmapped\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mlib\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mmap_infer\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mvalues\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mf\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mconvert\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mconvert_dtype\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 2356\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 2357\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mlen\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mmapped\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;32mand\u001b[0m \u001b[0misinstance\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mmapped\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;36m0\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mSeries\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
+ "\u001b[0;32mpandas/_libs/src/inference.pyx\u001b[0m in \u001b[0;36mpandas._libs.lib.map_infer (pandas/_libs/lib.c:66645)\u001b[0;34m()\u001b[0m\n",
+ "\u001b[0;32m~/dev/io.trygvis/2017/07/ee-python/src/ee/formatting/__init__.py\u001b[0m in \u001b[0;36mee_parse\u001b[0;34m(s)\u001b[0m\n\u001b[1;32m 99\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 100\u001b[0m \u001b[0;32mdef\u001b[0m \u001b[0mee_parse\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0ms\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 101\u001b[0;31m \u001b[0;32mraise\u001b[0m \u001b[0;34m\"deprecated\"\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 102\u001b[0m \u001b[0;32mfrom\u001b[0m \u001b[0mdecimal\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mDecimal\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 103\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n",
+ "\u001b[0;31mTypeError\u001b[0m: exceptions must derive from BaseException"
+ ]
+ }
+ ],
+ "source": [
+ "bom[\"value\"].apply(ee_parse)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 229,
+ "metadata": {},
+ "outputs": [
+ {
+ "ename": "KeyError",
+ "evalue": "'Part Number'",
+ "output_type": "error",
+ "traceback": [
+ "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
+ "\u001b[0;31mKeyError\u001b[0m Traceback (most recent call last)",
+ "\u001b[0;32m<ipython-input-229-4f16cda01558>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m()\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0;32mfor\u001b[0m \u001b[0mpn\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mitem\u001b[0m \u001b[0;32min\u001b[0m \u001b[0mbom\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mgroupby\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;34m'Part Number'\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 2\u001b[0m \u001b[0mg\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mx\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mget_group\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mpn\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 3\u001b[0m \u001b[0mprint\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m\"# {}:\\n{}\\n\\n\"\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mformat\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mpn\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mlen\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mg\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 4\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 5\u001b[0m \u001b[0mg\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
+ "\u001b[0;32m~/dev/io.trygvis/2017/07/ee-python/env-python3/lib/python3.5/site-packages/pandas/core/generic.py\u001b[0m in \u001b[0;36mgroupby\u001b[0;34m(self, by, axis, level, as_index, sort, group_keys, squeeze, **kwargs)\u001b[0m\n\u001b[1;32m 4414\u001b[0m return groupby(self, by=by, axis=axis, level=level, as_index=as_index,\n\u001b[1;32m 4415\u001b[0m \u001b[0msort\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0msort\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mgroup_keys\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mgroup_keys\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0msqueeze\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0msqueeze\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 4416\u001b[0;31m **kwargs)\n\u001b[0m\u001b[1;32m 4417\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 4418\u001b[0m def asfreq(self, freq, method=None, how=None, normalize=False,\n",
+ "\u001b[0;32m~/dev/io.trygvis/2017/07/ee-python/env-python3/lib/python3.5/site-packages/pandas/core/groupby.py\u001b[0m in \u001b[0;36mgroupby\u001b[0;34m(obj, by, **kwds)\u001b[0m\n\u001b[1;32m 1697\u001b[0m \u001b[0;32mraise\u001b[0m \u001b[0mTypeError\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m'invalid type: %s'\u001b[0m \u001b[0;34m%\u001b[0m \u001b[0mtype\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mobj\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1698\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 1699\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0mklass\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mobj\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mby\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mkwds\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 1700\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1701\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n",
+ "\u001b[0;32m~/dev/io.trygvis/2017/07/ee-python/env-python3/lib/python3.5/site-packages/pandas/core/groupby.py\u001b[0m in \u001b[0;36m__init__\u001b[0;34m(self, obj, keys, axis, level, grouper, exclusions, selection, as_index, sort, group_keys, squeeze, **kwargs)\u001b[0m\n\u001b[1;32m 390\u001b[0m \u001b[0mlevel\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mlevel\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 391\u001b[0m \u001b[0msort\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0msort\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 392\u001b[0;31m mutated=self.mutated)\n\u001b[0m\u001b[1;32m 393\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 394\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mobj\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mobj\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
+ "\u001b[0;32m~/dev/io.trygvis/2017/07/ee-python/env-python3/lib/python3.5/site-packages/pandas/core/groupby.py\u001b[0m in \u001b[0;36m_get_grouper\u001b[0;34m(obj, key, axis, level, sort, mutated)\u001b[0m\n\u001b[1;32m 2688\u001b[0m \u001b[0min_axis\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mname\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mlevel\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mgpr\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;32mFalse\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mgpr\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 2689\u001b[0m \u001b[0;32melse\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 2690\u001b[0;31m \u001b[0;32mraise\u001b[0m \u001b[0mKeyError\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mgpr\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 2691\u001b[0m \u001b[0;32melif\u001b[0m \u001b[0misinstance\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mgpr\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mGrouper\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;32mand\u001b[0m \u001b[0mgpr\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mkey\u001b[0m \u001b[0;32mis\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 2692\u001b[0m \u001b[0;31m# Add key to exclusions\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
+ "\u001b[0;31mKeyError\u001b[0m: 'Part Number'"
+ ]
+ }
+ ],
+ "source": [
+ "for pn, item in bom.groupby(['Part Number']):\n",
+ " g = x.get_group(pn)\n",
+ " print(\"# {}:\\n{}\\n\\n\".format(pn, len(g)))\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 325,
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "text/html": [
+ "<div>\n",
+ "<style>\n",
+ " .dataframe thead tr:only-child th {\n",
+ " text-align: right;\n",
+ " }\n",
+ "\n",
+ " .dataframe thead th {\n",
+ " text-align: left;\n",
+ " }\n",
+ "\n",
+ " .dataframe tbody tr th {\n",
+ " vertical-align: top;\n",
+ " }\n",
+ "</style>\n",
+ "<table border=\"1\" class=\"dataframe\">\n",
+ " <thead>\n",
+ " <tr style=\"text-align: right;\">\n",
+ " <th></th>\n",
+ " <th>in</th>\n",
+ " <th>value</th>\n",
+ " <th>exp</th>\n",
+ " <th>unit</th>\n",
+ " <th>rest</th>\n",
+ " <th>len(rest)</th>\n",
+ " </tr>\n",
+ " </thead>\n",
+ " <tbody>\n",
+ " <tr>\n",
+ " <th>0</th>\n",
+ " <td>10</td>\n",
+ " <td>10</td>\n",
+ " <td></td>\n",
+ " <td></td>\n",
+ " <td></td>\n",
+ " <td>0</td>\n",
+ " </tr>\n",
+ " <tr>\n",
+ " <th>1</th>\n",
+ " <td>10k</td>\n",
+ " <td>10</td>\n",
+ " <td>k</td>\n",
+ " <td></td>\n",
+ " <td></td>\n",
+ " <td>0</td>\n",
+ " </tr>\n",
+ " <tr>\n",
+ " <th>2</th>\n",
+ " <td>10kOhm</td>\n",
+ " <td>10</td>\n",
+ " <td>k</td>\n",
+ " <td>Ohm</td>\n",
+ " <td></td>\n",
+ " <td>0</td>\n",
+ " </tr>\n",
+ " <tr>\n",
+ " <th>3</th>\n",
+ " <td>10k G</td>\n",
+ " <td>10</td>\n",
+ " <td>k</td>\n",
+ " <td></td>\n",
+ " <td>G</td>\n",
+ " <td>1</td>\n",
+ " </tr>\n",
+ " <tr>\n",
+ " <th>4</th>\n",
+ " <td>10M Hwat</td>\n",
+ " <td>10</td>\n",
+ " <td>M</td>\n",
+ " <td>H</td>\n",
+ " <td>wat</td>\n",
+ " <td>3</td>\n",
+ " </tr>\n",
+ " </tbody>\n",
+ "</table>\n",
+ "</div>"
+ ],
+ "text/plain": [
+ " in value exp unit rest len(rest)\n",
+ "0 10 10 0\n",
+ "1 10k 10 k 0\n",
+ "2 10kOhm 10 k Ohm 0\n",
+ "3 10k G 10 k G 1\n",
+ "4 10M Hwat 10 M H wat 3"
+ ]
+ },
+ "execution_count": 325,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "import re\n",
+ "r=re.compile(\"([0-9]+)( *)([EMpPnuTµkmGf]?) *(F|Ohm|Ω|H?) *(.*)\")\n",
+ "\n",
+ "tests = [\"10\", \"10k\", \"10kOhm\", \"10k G\", \"10M Hwat\"]\n",
+ "data=[]\n",
+ "\n",
+ "for t in tests:\n",
+ " m=r.match(t)\n",
+ " gs=m.groups()\n",
+ " data.append((t, gs[0], gs[2], gs[3], gs[4], len(gs[4])))\n",
+ "\n",
+ "pandas.DataFrame(data=data, columns=['in', 'value', 'exp', 'unit', 'rest', 'len(rest)'])"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 300,
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "array([[ 1.27270446, 0.04395931, 1.54053766, -0.29093601, 1.30028845],\n",
+ " [-0.12251453, -1.16148211, 0.53045512, 0.44172195, 0.94238916],\n",
+ " [-0.12981926, -0.98367131, 0.37159006, 0.6195868 , -0.90403497],\n",
+ " [ 0.26614445, 0.47932884, 0.23314929, -0.15904921, 1.3544832 ],\n",
+ " [-1.19267536, 2.33740053, -1.18444525, 0.44111548, 0.60629138],\n",
+ " [-1.45884344, 0.61256059, -0.97138815, -0.82263728, 0.68976108],\n",
+ " [ 1.08294243, 0.88823694, -0.19957563, 0.52466939, -0.38971842],\n",
+ " [-0.94265388, 1.86801751, 0.21990138, -1.34364849, 0.32846411],\n",
+ " [ 0.83686376, -1.03843546, 0.84131267, -1.10071726, -0.25169346],\n",
+ " [-0.50006954, 1.21361699, 0.14561531, -0.39272299, 0.30361834]])"
+ ]
+ },
+ "execution_count": 300,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "import numpy as np\n",
+ "np.random.randn(10, 5)"
+ ]
+ }
+ ],
+ "metadata": {
+ "kernelspec": {
+ "display_name": "Python 3",
+ "language": "python",
+ "name": "python3"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 3
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython3",
+ "version": "3.5.4rc1"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 2
+}