## Sunday, 9 July 2017

### Python matplotlib: insets and aligned legends

Sometimes it is needed to create a plot with several lines and to assign a legend to each of them, which quite often ends in cumbersome and clunky legends. In my opinion, a more elegant way is include the legend as aligned text aside to each plot line, which is possible using Python and matplotlib.

Furthermore, to better highlight some details it is also possible to use an inset, hence to add a box which zooms a particular detail of the plot.

In the following is the Python code. The style is optimised for an IEEEtran journal.

## Thursday, 9 February 2017

### Peer review template based on IEEEtran and pandoc

When you start to be involved in scientific publishing, one of the side-effects is to become a reviewer for some journals. This side-effect is an extremely important part of the scientific publishing process, which should ensure the quality of the published papers. It has also some other advantages, as to be able to view the papers few months before they would be published. The major downside is the time required for a good review, even days.

To simplify the writing process I decided to create a simple workflow which is based on $$\LaTeX$$, IEEEtran and pandoc. The final output will be made up of a .pdf file, formatted as an IEEEtran journal, and a .rst file, formatted as a reStructuredText. The .pdf is ideal for viewing the math, figures, etc., while the .rst file is ideal to be pasted in the comments part, which is the part that will be sent in the email to the authors.

### International Morse Code

This is a nerdy post, just to share a cheat-sheet which contains the International Morse Code along with the NATO Phonetic alphabet. I created this, using various resources online, just to lose some time...

## Wednesday, 8 February 2017

### Import a RF design from a Gerber file into Kicad

KiCad is a wonderful software for PCB designing, which is opensource and can supply the complete workflow from the schematic to the final layout.

Unfortunately, it is not intended for RF circuit and antenna design. In these cases, a suitable program should be used, which could be ADS, CST, HFSS, or others. These are highly expensive but, unfortunately, the opensource tools are still not so complete. A good one is Qucs, but is missing some features and is quite complex to use. Moreover, it is missing the layout function.

Long story short, I was facing with the need to create a PCB by incorporating some custom Wireless Power Transfer coils, which I could export to a gerber file from CST, some antennas, again from CST, and some matching circuits, from ADS. The idea was to import the different parts from the gerber into different footprints, which will be assigned to some schematics blocks and then placed in the pcb.

There are no ways to get it simply by using some pre-baked functions, but some tricks are needed.

I will list two possible ways that can be used. The first is easier but the result can be less perfect from a conceptual point of view. The result is practically the same board.

## Monday, 9 May 2016

### Visually engaging periodic plots using Python

In order to obtain periodic images with a technical feel to be embedded in a website, I decided to compose them with Python and Matplotlib. The plots are essentially some sums and multiplications of "noisy" sines.