Sometimes an Ubuntu in-place upgrade will error, failing to install packages like:
systemd-sysv
init
gvfs
At the end of the install, the Ubuntu upgrade installer said the install had failed, and it was going to revert with dpkg --configure -a.
That will typically also fail.
As a last resort, consider a recovery procedure as below.
This will keep the new Ubuntu version if it works.
Open a second Terminal, WITHOUT clicking close on that dialog:
As a radio scientist, I need software defined radio (SDR) transmitters that ingest raw IQ (in-phase, quadrature) data.
IQ data allows transmitting anything within the instantaneous bandwidth and dynamic range limitations of the particular SDR.
The
rpitx program
by F5OEO ingests IQ data (and has utilities to convert from audio to popular analog formats such as SSB, AM, and FM voice) to transmit on air from the Raspberry Pi onboard PLL via PWM accessed on the GPIO 12 pin using DMA.
The Raspberry Pi BCM2835 PLL PLLD operates at 500 MHz,
decimated down to the carrier frequency desired and modulated, with claimed resolution ~16 bit.
Install rpitx at Raspberry Pi Terminal:
apt install git
git clone https://github.com/F5OEO/rpitx
cd rpitx
./install.sh
Run rpitx IQ transmitter:
rpitx -i myfile.bin -m iq -f 97500
This command transmits single-precision complex64 IQ file myfile.bin at 97.5 MHz center frequency (consider the error in the Raspberry Pi PLL baseclock).
F5OEO notes live video streaming 64 k-symbol/sec - 4 M-symbol/sec DVS-B using
rpidatv,
which sends DVS-B HD video receivable by the $20 RTL-SDR dongles.
With the Raspberry Pi 2 collecting samples at 2.048 MS/s, about 3% of one CPU core is used.
This does not include demodulation, just passing samples.
After installing rtl-sdr, you can playback over the Raspberry Pi headphone jack using aplay.
A subtle yet critical problem using double precision complex numbers can arise between Fortran and Python using f2py.
f2py doesn’t seem to understand the kind parameters we specify when assigning a variable.
f2py assumes your complex numbers are single precision (8 bytes per complex number) instead of double precision (16 bytes per complex number).
You won’t get an error on compiling, but your Python program importing the Fortran .so module will give erroneous results.
Note: USB-PD dominates the market now, this was just some old measurements of Quick Charge 2.0.
Upon plugging USB power from a Quick Charge 3.0 charger into a Quick Charge 2.0 capable device, a small fraction of a second is spent at 5 V input, while the Quick Charge 2.0 rate is negotiated.
Starting from 20% charge, in less than 2 hours the device is completely charged.
Phone battery charge of 20% → 60% is achieved in 40 minutes.
Quick Charge 2.0 voltage/current vs time: the table below is approximate, with the display off.
At 100% charge, the rate bounced between 0.02 - 0.2 amps as the phone periodically checks for email, etc.
Most of the time, it was at about 50 mA.
Comments on June 2014 AAAS Science
article
on open data and open code for scientists are given below.
The article refers to the E. White
paper
on nine easy ways to share code.
Maybe you don’t have the time to read those, so let me give you six quick tips to:
increase your citation count
increase your data usage (more citations)
increase your code sharing (more citations and lucrative job opportunities).
Learn a popular science/engineering programming language. It will boost productivity and job opportunities. The language you should be using is Python, as it can run on supercomputers down to the $5 Raspberry Pi Zero. Python can streamline/inline CUDA, Fortran, and C for very fast speed while being easy to code for controlling hardware and doing simulations and image/data analysis of datasets of all sizes.
Learn how to use HDF5. Try to use it right at your data acquisition source if it’s not a very high data rate application. Try to avoid making up your own formats or using text to store data unless completely necessary.
Learn how to use version control. Git is an excellent choice. You will save massive amounts of time when it comes to some typo you made and you didn’t keep an old filename version.
Learn how to use Github and be appropriately prolific about posting your code there. This leads to visibility and opportunity.
Put examples, plots, and documentation of how to install and use your code in a README file.
Publish your data online. Don’t leave it on some RAID drive or USB drive somewhere. The drive will fail eventually or the room will get flooded. Worst of all is CD/DVD, they have a very short lifespan, less that the length of your PhD studies. Keep your data in multiple online places.
After installing more RAM the laptop turned on to a black screen.
There was no response to Fn keys, no Fn Lock LED, no mute LED, couldn’t get the keyboard to light up beyond the initial flareup/flaredown.
After 45 seconds and the system restarted normally.
It seems there’s some kind of self-check the laptop runs once upon RAM size change.
Too bad they don’t put a “RAM testing” notice on the screen to avoid panic of the user!
If a VirtualBox virtual machine can’t see Shared Folders in your Windows guest with Linux host, fix by:
In Linux Terminal:
adduser $(whoami) vboxusers
In Virtualbox Windows guest, click Install Guest Additions in the VirtualBox menu
Run setup on the virtual drive that appears.
Reboot the Windows guest.
From Windows guest Command Prompt:
net use x: \\vboxsvr\share
where “share” is the name assigned in the VirtualBox shared folders dialog.
One should generally save data in open formats like netCDF4 or HDF5 instead of proprietary formats.
An exception to this is with real-time instrument data acquisition that saves the raw data at high speed to binary files, which can be converted offline to open formats.
IDL
.sav` files
are a proprietary data format that can be read from Python:
fromscipy.ioimport readsav
data = readsav('mydata.sav')
data
dict() of IDL variables.
Example: I wrote a one-off IDL script to convert from IDL .sav to netCDF4:
sav2nc.pro.
I also have Python code there to convert from IDL .sav to HDF5.
I successfully submitted a
patch to SciPy
to fix some IDL .sav reading issues.
Updated C code horn.c, lucas.c
from the J.L. Barron 1994 article “Performance of Optical Flow Techniques” that can easily compile with today’s compilers.