Gas station without pumps

2018 October 28

Redrawing figure in SVG

Filed under: Circuits course — gasstationwithoutpumps @ 20:18
Tags: , , , , , ,

There is a figure in my book of the cross-section of a power nFET.  Originally, I used a figure from wikimedia:, but I wanted a color version, so I colorized it myself in Inkscape.  Unfortunately, the original SVG was poorly done—it looked like an inkscape conversion of a raster image to paths, which did not result in paths enclosing fillable areas with clean strokes around them, but separate paths filled with black for each stroke.  This made colorizing the image quite difficult.  I did (eventually) manage to make a colorized version, but I’ve never been happy with it.  The file is huge for an SVG file (over 81kB) and difficult to edit.  I’ve been wanting to do it right for some time, and I finally got around to it today.

What I did was to print out the version I’ve been using as a full-page image, then used a ruler to figure out how big each part was.  I then entered SVG code by hand to remake the image. I included comments to describe what each part did and used styles for the different materials, so editing is now easy.  I also made sure that the image is now symmetric and that all the rounded corners have smooth joins to the straight lines (the “q” command in the path “d” attribute makes that fairly easy. The new svg file is only 3425 bytes, even with the comments, and the pdf created from it is only 8kB, instead of 28kB.  Those size changes are not very important (the PDF for the book, after all, is now 25MB, up from 23.7MB last spring), but the image looks better now also. does not let me upload svg files, but you can see the PDF produced from it by inkscape at only lets me upload raster images for display, so I used inkscape to convert the hand-written SVG file to PNG just for this blog. The black line on the right edge seems to have been chopped off in the conversion, though the PDF conversion gets it right.

Here is the PNG generated by inkscape from the SVG file.

I tried uploading the SVG file to Wikimedia Commons, so it could be used on the Wikipedia Power MOSFET page, in place of the black-and-white image, but the uploaded file got rendered as a badly wrong black-and-white PNG file (with all colors converted to black), which is totally useless. I don’t have time to figure out how to tell it to do the conversion correctly, so I just asked them to delete the image again.

Correction 2018 Nov 21: I realized that the drawing from Wikipedia is missing something—the body should be lightly-doped P, with a P+ contact to the metal. The doping profile for the P layer also does not make physical sense here—how does it get shallower under the N+?  I have redrawn the figure for the book, but not corrected it here. I’ve removed the svg source from this post, because WordPress mangled it completely, despite the use of the “source” square-bracket tag. 


2016 January 16

Lawyers to avoid

Filed under: Uncategorized — gasstationwithoutpumps @ 10:40
Tags: , , ,

If I were ever stupid enough to run for public office, I know one group of lawyers to avoid at all costs: Seattle-based Garvey Schubert Barer.  Apparently the bright boys there decided to issue Wikimedia with a take-down order for putting up pictures of copyrighted campaign materials from the Bernie Sanders campaign. (source:

Never mind that the whole point of campaign stickers and buttons is to have them displayed as widely as possible.

Never mind that including pictures of campaign materials in an encyclopedia is clearly covered by fair-use doctrines.

Apparently Garvey Schubert Barer hires idiots.  I wonder whether they will make a public apology for doing something stupid, but they’re lawyers, so I doubt it—they probably still think that they can make a case for it being the “right” thing to do.   The takedown order has been withdrawn, but the media storm about it is just about to start.

If I were a conspiracy theorist, I would conjecture that this was not the act of an incompetent and idiotic lawyer (though, in the real world, that is the most likely explanation). Instead, I would conjecture that the lawyer who did this was paid under the table by some rich guy who feared that Sanders might win the election, after all the money he had spent to buy Clinton’s favor.  (The Republican candidates were all bought and paid for decades ago, and their handlers are unlikely to attack Sanders in this way, because in their bubble chamber Sanders can’t win—he has no billionaires backing him, and everyone in their world knows that anyone who isn’t a billionaire is a loser—just ask Trump.)

I understand that the Clinton campaign is starting to attack Sanders, which I think is a strategic error.  Part of what has been making the Democrats electable is that they have been behaving like adults, rather than petulant toddlers like the Republican candidates. In fact, I think that a lot of Democrats have been secretly hoping for Sanders/Clinton double-bill, with the primary mostly about who gets top billing. I know it goes against the grain of American politics to have a competent person as a vice presidential candidate—but it would be nice to have two competent people, either of whom would make a good president, working together as President and Vice President.  If the Clinton and Sanders campaigns start throwing mud or engaging in dirty tricks, then it will be nearly impossible to put together such a winning ticket.

Personally, I’m rooting for Bernie, as is most of the town I live in (Santa Cruz has been described as The Leftmost City), as I am tired of center-right politicians like Obama and Clinton being described as leftists or socialists.  Why does the media allow the wingnuts on the far right to redefine the “center” far to the right of where the center really is?

We need to get more progressive politicians at the state and national level, to undo the  damage that has been done by the concentration of wealth and privilege in the hands of a very small group of greedy men.  Bernie Sanders is one of the few progressives who has survived Washington with his honor mostly intact.  (Barbara Boxer is another, but she seems to be withdrawing from electoral politics and has rather tepidly endorsed Clinton, as a show of support for female politicians.)


2012 September 8

ISCB Wikipedia competition

Filed under: Uncategorized — gasstationwithoutpumps @ 16:45
Tags: , , ,

The International Society for Computational Biology is finally getting serious about improving the coverage of computational biology in Wikipedia.

They’ve announced a competition (running from 2012 Sept 9 to 2013 Jan 10) for improvements to approximately 1100 articles that have been identified as relevant to computational biology.  (It is also possible to start new articles, if a topic is currently missing.)

Contest information can be found at Wikipedia:WikiProject Computational Biology/ISCB competition announcement – Wikipedia, the free encyclopedia.

The prizes are not big (first is $500 (US) and a year’s membership to the ISCB, second is $200 and a year’s membership to the ISCB), but either one would look good on a resume, and the service to the community is useful even for those who get no prizes.


2012 September 2

Wikipedia books, another approach for a free/cheap textbook

Filed under: Circuits course — gasstationwithoutpumps @ 14:06
Tags: , , , , , ,

I’ve been thinking about another approach to providing a low-cost textbook for the circuits class: bundling a number of Wikipedia articles into a Wikipedia book, like the Introduction to Electronics one.  The idea is an appealing one, as many of the Wikipedia articles are excellent (better written than many textbooks), we can customize what topics to include, small errors in the text can be corrected, and students can either access the “book” online, download it in in PDF, ZIM, or OpenDocument format, or even pay for a printed copy.  The downloaded or printed copies will be frozen, while the live Wikipedia book gets updated every time one of the contained articles is edited.  We could provide frozen copies on the course web site, as a precaution against major rewrites removing information we expect students to read.

The Introduction to Electronics Wikipedia book does not have exactly the subjects we would need for our course, but several of the articles there are appropriate.  One attraction of this approach is that we can tailor our book to have exactly the content we need (assuming the articles we need exist) in the order we want. We can design our course by listing the topics we need in the order we need, and automatically have a text that matches. Given the somewhat idiosyncratic nature of our course (from basic circuits to EKG design, with side trips into electrodes and possibly fluidics modeling), we’re going to have to cobble together multiple sources anyway, so a Wikipedia book may be a good way to create the main text.  No matter what text we use, we’ll have to supplement with manufacturers’ data sheets, which can’t be included in a Wikipedia book because of copyright restrictions.

One disadvantage of Wikipedia books is that the articles in Wikipedia are by different authors and have no implicit ordering, so concepts cannot be developed in a gradual manner.  Individual articles are written at very different levels of sophistication, and some articles will have only a few sections that are relevant to the course.  The book would not be as smooth as a well-written textbook, but better than many of the poorly written ones on the market. I believe that we can add some manually created text (part of the book, but not part of Wikipedia) to introduce chapters, but I’m not exactly sure how (probably it involves including pages that are part of Wikipedia user space rather than public space).

Note: Wikipedia books are different from WikiBooks, which are from a project to create crowd-sourced free textbooks.  The electronics books currently available from WikiBooks are very incomplete and not as well written as Wikipedia articles, so I don’t think that they will be useful this year.

I started playing a bit with Wikipedia’s “Book Creator” and found it to be a very awkward interface.  Clicking on pages to add them to the book being created worked ok, but dragging the pages around to reorder them did not and the claimed button for adding chapters never appeared.  Furthermore, once you save a draft book, the book creator assumes you want to start a new one, so clicking on pages can’t add to an existing draft.  It seems that the book creator is damn near useless after the first 5 minutes, and after that you just have to edit the book like any other Wikipedia page.

2012 July 26

Editing Wikipedia for scientists

Filed under: Uncategorized — gasstationwithoutpumps @ 09:28
Tags: , , , ,

Today I got an e-mail message for an interesting workshop associated with the European Conference on Computational Biology. I don’t have the funding to go to Basel this year (I didn’t even go to ISMB in Long Beach), but I agree with Alex Bateman and Daniel Mietchen that it is important for scientists to become Wikipedia editors.  I’ve done a little Wikipedia editing, though not as much as I feel I should. The effort is only internally rewarding—there are no bonus points in academia for writing and editing Wikipedia articles, though they probably have more influence than regular encyclopedias, textbooks, and research monographs combined.

One problem with editing Wikipedia is that it requires fairly frequent visits to undo damage done by ignorant editors, which greatly reduces the internal reward.  Having carefully crafted explanations deleted or mangled repeatedly makes one much less willing to put in the effort to do create them.

===== Call for Participation ======

Editing Wikipedia for scientists
Sunday, 9 September 2012, Basel, Switzerland



We cordially invite you to follow the tutorial “Editing Wikipedia for scientists” held as pre-conference event to ECCB’12 on 9 September 2012 in Basel, Switzerland.

Wikipedia has become an essential repository of scientific information. If anyone is looking for information about your subject area the chances are that a Google search will direct them to the Wikipedia article first. If you would like to get involved in improving Wikipedia content for your subject but never found out how then come to the ECCB Wikipedia tutorial. We’ll show you the basics of editing, as well as telling you how to avoid the common mistakes:

Many people look at Wikipedia as their first port of call for information. Therefore, we believe that it is important for scientists to feel comfortable in editing Wikipedia to ensure it is factually accurate and up to date in their own area of expertise.

Looking forward to seeing you in Basel!

Alex Bateman, Wellcome Trust Sanger Institute, UK.
Daniel Mietchen, EvoMRI Communications.

PS: Please note that you can register for the ECCB tutorials and workshops also without participating to the main conference. Early registration deadline is 1 August 2012.

ECCB’12 – European Conference on Computational Biology 2012
9-12 September 2012, Basel Switzerland

—- Stay informed:
ECCB12 mailing list

%d bloggers like this: