Used RichCopy to backup files to an external hard disk. Has the filters I need - copy if size is different, etc. This blog post is also illuminating - RoboCopy vs RichCopy vs SyncBack vs EMCopy vs XXCopy vs XCopy vs KillCopy.
Wednesday, October 14, 2015
shortcut for working with multi-language audio and channel configuration
When working with WAV to AC3 encoder, we can drag and drop files into the window instead of clicking on the MUX Wizard button and choosing the respective channels. WAV to AC3 encoder needs 48 k 16 bit mono wav files in the default configuration, and the file order is
L
R
C
SL
SR
This is also the order in which the MUX files are saved from within the MUX Wizard.
Our channel configuration order is
C - Telugu
SL - English
SR - Malayalam / Tamil
SW - Not used / Kannada
L
R
C
SL
SR
This is also the order in which the MUX files are saved from within the MUX Wizard.
Our channel configuration order is
FL - speakers
FR - Hindi
FR - Hindi
SL - English
SW - Not used / Kannada
Tuesday, October 13, 2015
headphone solution
Our planetarium's headphone based audio solution in Planetarian magazine,
Planetarian Archives
Direct link to page 54 of Sep 2015 issue pdf
Planetarian Archives
Direct link to page 54 of Sep 2015 issue pdf
Monday, September 21, 2015
google spreadsheets firefox issue
I had an irritating issue of google spreadsheets showing screen corruption when any cell was clicked. This issue started after the sheets update in which they introduced the "Explore" button on the bottom right.

One workaround is to click on the small downward arrow to the right of the column headers A, B, C, D etc. When the column menu comes up and we dismiss it by clicking again on the column header, the sheet seems to get cleaned up. But only temporarily. Waiting for Firefox or Sheets to get this fixed. 
Edit: 6 Jan 2016 - this seems to be fixed now.
Thursday, August 20, 2015
resizing matrices in Matlab
In my previous post, I'd mentioned processing 2-D matrices to put them into relevant rows and columns instead of just 5 numbers per line. This rearrangement of matrix elements uses the reshape function. In our case,
A_rz=reshape(A_rz',1,numel(A_rz));
A_rz=reshape(A_rz,30,30);
A_rz=A_rz';
A_rz=reshape(A_rz',1,numel(A_rz));
A_rz=reshape(A_rz,30,30);
A_rz=A_rz';
using MCML - Monte Carlo light transport in multi-layered scattering media
is referenced in Wang and Wu's Biomedical Optics. Some points I noted for its usage are given below, in addition to the documentation available in the book as well as the included paper in the download.
- I used Fabrice Bellard's Tiny C compiler to re-compile the code on Windows. It's only a 386 kB standalone download, as against gcc's MinGW and CygWin options which are installers which download more files.
- After extracting the zip file, you can add its location to the path variable - Control Panel -> System -> Advanced -> Environment Variables, and then restart the system, or add it to the commandline for a temporary session.
- Compile, link and create executable with just
tcc -o mcml.exe mcmlmain.c mcmlgo.c mcmlio.c mcmlnr.c
Done in less than a second. - Incident light angle has direction cosines (0,0,1) by default, can change in mcmlgo.c
- The output 2-D arrays of Tt_ra, Rd_ra, A_rz are formatted in the ASCII output file as 5 numbers per line(!) and not as lines and columns related to the 2-D array. This can be modified in mcmlio.c - or, of course, when the array is imported into something like Matlab, it needs further processing.
- Large txt files are created by mcml in case large numbers are specified for dz, dr and da - these will need txt file editors which can handle large files. Files upto a few hundred MB were OK with PsPad, other options are gVim etc as noted here.
- Section 3.5 of the Biomedical Optics book talks about overflow in the grid - we have to note this - that the last grid element in the direction of the overflow collects the weight - and have to discard that point. In reconstruction Fig 3.4, for eg, the first grid element reading has to be discarded - T_t(0). - or perhaps this is because the measured value is T_t (total transmittance) and what we need is T_d (diffuse transmittance). The angle a (or alpha) in R_d(a) is angle of reflection, so it goes from 0 to pi/2.
- Section 3.5 also talks about how we should choose the grid size - numbers of da, dz and dr along with values of dz and dr - as a rule of thumb, each grid element should measure about 10% of penetration depth or transport mean free path.
Friday, August 14, 2015
free up space on C drive - MSOCache
Wanted to free up space on C drive. Found this superuser post about moving MSOCache folder to another drive. The mklink solution suggested there did not work, probably because I am on Windows XP and not Win7. But I did the registry editing technique, using advanced regedit to find and replace C:\MSOCache with D:\MSOCache
extracting data from open UDF session
We received some data on a DVD which had an open UDF session - DVD session had not been closed. On Mac and on Windows explorer, the disc displays as empty. Nero Burning Rom's Disc Info showed the open session, but my DVD writer has some writing issues, so I was unable to close the session with Nero 8. The writer which is working is on a machine which has Nero 6, which does not have the Finalize session option. Googled for closing UDF session, and videohelp forums pointed to ISO buster. I had ISO buster, which was able to extract the files with no issues.
Sunday, August 09, 2015
USB printer issues
A TVS MSP 345 dot matrix printer connected using a parallel to USB converter cable to the laptop's USB port did not print today. Tried re-installing the driver, still no go. Then, cycled through the three virtual printer ports in printer properties -> ports, USB001, USB002 and USB003. It finally worked with USB003.


Friday, July 03, 2015
google transliterate bug and workaround
Using the "Input tools" on Google Docs, transliterating to Devanagari (Hindi) script - at time, the cursor disappears and input does not occur where we want it to go.
This seems to happen on Firefox when the choices drop-down is clicked with a mouse instead of using the keyboard shortcut.
This seems to happen on Firefox when the choices drop-down is clicked with a mouse instead of using the keyboard shortcut.
So, the workaround is to use keyboard shortcuts, like 4 for Baahut above etc.
In case it does get stuck, refreshing the page gets you back to where you were, and then you will need to re-select the input tools. A less troublesome recovery, which sometimes works, is to type some more, and when the choices drop-down appears, hit the escape key.
Tuesday, June 30, 2015
fulldome short - 2015 - Year of Light
2015 YEAR OF LIGHT - the International Year of Light is a global
initiative adopted by the United Nations to raise awareness of how
optical technologies promote sustainable development and provide
solutions to worldwide challenges in energy, education, agriculture,
communications and health. In this short immersive film by Carl Zeiss,
seven minutes of memorable visualisations highlight various significant
aspects of light. Visible or invisible, light is everywhere. We are reminded
of its omnipresence and how - amongst other things - light creates
moods and emotions, is turned into electricity, is a manufacturing tool
and is used for communications.
fulldome clip - GALACTIC JOURNEY
GALACTIC JOURNEY - fly your audience across immense regions of deep
space with this accurate visualisation of 120,000 galaxies viewed from
the southern hemisphere. Courtesy of the Anglo-Australian Observatory,
Paul Bourke, Peter Morse & Glenn Rogers
FILM TYPE
Cosmology
Key Stages 3-5, General audiences
Length: 2.5 min
Available from BFI,
FILM TYPE
Cosmology
Key Stages 3-5, General audiences
Length: 2.5 min
Available from BFI,
Monday, June 29, 2015
extracting audio from mov file
A quicktime video file (.mov) from eplanetarium displayed unknown input format in KMplayer, which did play it, but was not being recognized by directshow. Avidemux was able to extract the audio - chose audio output PCM and saved it as .pcm - then Cool Edit Pro could read it.
Thursday, June 25, 2015
problems with Unicode fonts on QuickTime7 for Windows
Working with the eplanetarium team for Indian language subtitles, we ran into a road-block - the workaround seems to be only burnt-in subtitles.
The issue seems to be that QT7 on Windows - and MediaShow, which runs on QT - does not support Unicode for subtitles. Excerpts from my emails below:
... I tried this technique given here,
http://www.7tutorials.com/changing-display-language-used-non-unicode-programs
Unfortunately, the Hindi option does not even appear ... The reason seems to be that only ISCII Hindi (Devanagari script) is supported and not Unicode Devanagari, as seen in the code conversion tables. So, it may not be possible to display the Unicode Hindi characters using the current subtitling tool and playback tool combination on Windows. Unicode capable playback tools seem to be able to display, like KMPlayer ... One caveat for Indian languages is that many operating systems have limited support for complex scripts. We may have to check if your subtitle creation software as well as the subtitle display software have proper Indic support. If not, the script would be jumbled. ....
The issue seems to be that QT7 on Windows - and MediaShow, which runs on QT - does not support Unicode for subtitles. Excerpts from my emails below:
... I tried this technique given here,
http://www.7tutorials.com/changing-display-language-used-non-unicode-programs
Unfortunately, the Hindi option does not even appear ... The reason seems to be that only ISCII Hindi (Devanagari script) is supported and not Unicode Devanagari, as seen in the code conversion tables. So, it may not be possible to display the Unicode Hindi characters using the current subtitling tool and playback tool combination on Windows. Unicode capable playback tools seem to be able to display, like KMPlayer ... One caveat for Indian languages is that many operating systems have limited support for complex scripts. We may have to check if your subtitle creation software as well as the subtitle display software have proper Indic support. If not, the script would be jumbled. ....
Tuesday, June 16, 2015
Assignments in Matlab
One of the students requested pointers for some assignments or mini projects he could do in Matlab. Here was my reply:
Since I'm not familiar with abstract math problems with Matlab, I'll have to suggest what I know about, and also what is got by googling. So, please take these only as vague pointers, discuss with your concerned teacher before proceeding further.
1. Visualizations. Matlab has got very nice built in plotting tools. Visualizations of fractals, chaotic system equations, other differential equations etc could be done. The Mandelbrot function is already implemented, you could play around with it to learn more, and implement other fractals.
http://in.mathworks.com/help/distcomp/examples/illustrating-three-approaches-to-gpu-computing-the-mandelbrot-set.html
If you make high-resolution circularly symmetric movies, you could also help the planetarium,
http://fractalfoundation.org/videos/
All sorts of value-added stuff can be done with visualizations - making guis for varying parameters, interactive graphs, etc etc.
2. Matlab has got a Symbolic Math toolkit. All sorts of higher level math can be modelled using this, like
http://ieeexplore.ieee.org/xpl/articleDetails.jsp?arnumber=5191494
http://in.mathworks.com/products/symbolic/features.html#key-features
3. Linear Algebra problems, Manifolds and such are very much solvable with Matlab, so taking up some problems with these might be useful, eg.
http://www.manopt.org/and many more,
https://www.google.co.in/search?q=manifolds+with+matlab
4. Scilab and Octave are open source Matlab clones. If you are looking at the programming side, there are many small functions which can be written for Scilab and Octave for better Matlab compatibility.
Thursday, June 11, 2015
dropped samples - clicks on Audition recordings
Found this issue of dropped samples - leading to clicks - on Audition recordings at Studio with the Audiogram interface. And maybe even with the Presonus too. The workaround was to record using Nuendo. S emailed with the solution as implemented by PB -
The clicks problem recurred and PB has once again reset the Preferences/Audition folder.
Now it is fine.
Finder/Go/Option key/Library/Pref/Audition -->Trash
Wednesday, June 10, 2015
full playback of downloaded youtube 1080p videos
In my earlier post, I had noted that the files repaired with mp4box -isma still would not play with DirectShow etc. Finally did a better analysis of the issue and found a solution.
As the mp4box documentation says, mp4box -info file.mp4 gives information about the file. Found that the downloaded youtube mp4 file, after the -isma fix, had three streams, like
Track # 1 Info - TrackID 201 - TimeScale 90000 - Duration 00:30:14.033
Track # 2 Info - TrackID 2 - TimeScale 90000 - Duration 00:00:01.000
Track # 3 Info - TrackID 1 - TimeScale 90000 - Duration 00:00:01.000
So, taking out only the genuine video track, in this case TrackID 201, made the file playable. In my case, I added the audio from the 360p file also, as below.
mp4box -add E1080p.mp4#201 -add E360p.mp4#audio E.mp4
So the output file E.mp4 contains the video track with TrackID 201 and the audio track from the second file - this file plays fine with DirectShow.
As the mp4box documentation says, mp4box -info file.mp4 gives information about the file. Found that the downloaded youtube mp4 file, after the -isma fix, had three streams, like
Track # 1 Info - TrackID 201 - TimeScale 90000 - Duration 00:30:14.033
Track # 2 Info - TrackID 2 - TimeScale 90000 - Duration 00:00:01.000
Track # 3 Info - TrackID 1 - TimeScale 90000 - Duration 00:00:01.000
So, taking out only the genuine video track, in this case TrackID 201, made the file playable. In my case, I added the audio from the 360p file also, as below.
mp4box -add E1080p.mp4#201 -add E360p.mp4#audio E.mp4
So the output file E.mp4 contains the video track with TrackID 201 and the audio track from the second file - this file plays fine with DirectShow.
Friday, June 05, 2015
recording tests with Zoom H1
The Zoom H1 I had sent for RK's Hindi voice-over has arrived here now. It can also work as a USB mic. Simplest way to record seems to be with Cool Edit Pro.
With Reaper, have to make sure that the sampling rate is set to the same sampling rate as on the H1, otherwise the recording comes out with breaks. File -> Project Settings -> Project Sample Rate, then Options -> Preferences -> Audio -> Device -> Audio System has to be set to ASIO and again the sample rate has to be set.
Noise floor is impressively low. A sample I recorded at the Studio on the Presonus digital mixer there, using a dynamic mic and with air-conditioning on had a noise floor of -50 dB. Compared to that, from my office room, with the computer, AC, fan etc turned off, the Zoom H1 with input level set to 40% had a noise floor of -63 dB! That was recording to the micro-SD card. With computer on and recording via USB - using the H1 as a USB mic - the noise floor was around -54 dB - mostly the computer fan noise. Bird sounds and outside traffic sounds were below -50 dB when the mic was next to my mouth, input level set to 40%, covered with a foam windscreen (pop filter). With AC on, a floor of around -45 dB.
With Reaper, have to make sure that the sampling rate is set to the same sampling rate as on the H1, otherwise the recording comes out with breaks. File -> Project Settings -> Project Sample Rate, then Options -> Preferences -> Audio -> Device -> Audio System has to be set to ASIO and again the sample rate has to be set.
Noise floor is impressively low. A sample I recorded at the Studio on the Presonus digital mixer there, using a dynamic mic and with air-conditioning on had a noise floor of -50 dB. Compared to that, from my office room, with the computer, AC, fan etc turned off, the Zoom H1 with input level set to 40% had a noise floor of -63 dB! That was recording to the micro-SD card. With computer on and recording via USB - using the H1 as a USB mic - the noise floor was around -54 dB - mostly the computer fan noise. Bird sounds and outside traffic sounds were below -50 dB when the mic was next to my mouth, input level set to 40%, covered with a foam windscreen (pop filter). With AC on, a floor of around -45 dB.
Saturday, May 30, 2015
correct aspect ratio of mp4 file without re-encoding
I wanted to correct the aspect ratio of an mp4 file without re-encoding. Videohelp.com forums had this question answered. In my case, the video was 640x268 pixels, and was supposed to be 4:3.
x * 640 / 268 = 4/3 ; So (1/x) = 640 * 3 / 268 * 4 = 160 / 89, approximately = 16/9
So, my commandline was
mp4box -add inputfile.mp4#1:par=9:16 -add inputfile.mp4#2 output.mp4
One caution - temp file seems to be created in the default Windows temp folder, or perhaps in the same folder as the input file - did not verify which. Overall operation takes as much time as two copy commands - "importing" and "writing" done separately.
x * 640 / 268 = 4/3 ; So (1/x) = 640 * 3 / 268 * 4 = 160 / 89, approximately = 16/9
So, my commandline was
mp4box -add inputfile.mp4#1:par=9:16 -add inputfile.mp4#2 output.mp4
One caution - temp file seems to be created in the default Windows temp folder, or perhaps in the same folder as the input file - did not verify which. Overall operation takes as much time as two copy commands - "importing" and "writing" done separately.
Wednesday, May 27, 2015
dicom viewers
idoimaging.com lists a whole lot of DICOM and other image format viewers. Searching there for viewers which do 3D volumetric rendering, found 3dimviewer - capable and free.
Subscribe to:
Posts (Atom)




