Monday, August 02, 2010

~ The Suicidal Assassins

Salam alaikum,

They are amongst us; as family members, as friends, as sibling, as parents, as children.
Beware! since these assassins attempt to victimize themselves and those around them to a slow painful death.

Personally they are perfectly normal humans, with no wish to inflict damage to their near and dear ones.
But they choose to embrace a dis-ease which is like a slow-mo suicide.
The affecting effect is long-term, with long-reach & is devastating.
Even people of high intellect get infected to it by choice, and in doing so prove that education, knowledge & intelligence can't rid one of stupidity.


Do you recognize them?
These are the people puffing n coughing deadly smoke out of their mouths every now n then, hurting themselves & people around them through passive smoking, knowing its hazards all along; .. these are the cigarette addicts, commonly called the (active) Smokers.


A smoker is guilty of several accounts, a few are listed like so:
  1. Life and health is trusted from Allah to humans, taking care of it is a duty. A smoker ignores this duty. 
  2. Smoking is slow suicide which is forbidden in Islam.
  3. Smoking is an addiction which is forbidden in Islam
  4. Smoking is a waste of time. 
  5. Spending money on smoking is a waste of money; 'israaf'.  
  6. A smoker ignores the warning given by people around him, and on the cigarette packs, and therefore holds complete responsibility for his actions.  
  7. A smoker is a threat to the life of his wife and lil children. 
  8. A smoker is a threat to his friends and colleagues. 
  9. A smoker has a foul smelling mouth which causes discomfort to Allah's creatures while praying in congregation.
  10. A smoker is a potential fire hazard. 
  11. A smoker is harmful to nature around him, such as, plants, birds etc. 
I, by no means, am attempting or tempting to create hatred against smokers, rather these sick people need our attention & care; we need to brain-storm a way to knock some sense into them.
May Allah rid all the smokers of their addiction.
Amin.


~*~*~*~*~~*~*~*~*~

Thursday, July 29, 2010

~ Innovation exploitation

Salam alaik,

Prediction or extrapolation offers the ultimate test of the information-content one possesses.
This process is most evident in toddlers, trying to explore the world around learning to walk n talk.
The ability that the Creator; Allah, has bestowed upon them is to be curious enough to learn_by_making_mistakes.
In other words, this ability allows one to compare an expected_out_come against actual _out_come.

Herez a make up example to explain: a child has some cool toy with black n white colors on it which he likes. Now he looks at the black n white colored stove & ponders, "hmmm... this (stove) looks cool, must be playable." Poor child burns his hand but learns a great deal - albeit the hard way - that all black n white stuff ain't so cool.
There was an error in the prediction - a great deal in this case - but lesson learnt was lasting nonetheless.


A less forgiving case is that of exercise questions at the end of chapters, written by seasoned authors.
A student uses the information given in the chapter to solve the exercise questions (which are not plug_this_formula_n_get_answer sort), only to find out that he couldn't quite get hold of it.
He goes back, reads up the same info over again from the perspective of the question, & try giving it another shot based on that info.
He, actually, is predicting & then improving on his grip about the subject from his initial error.

Same is the concept of Kalman filtering, i'm into these days.


Its a probability-based digital filter capable of filtering 'white noise', using its own error-information.

Here, the difference between a prediction and reality is called "innovation", & learning is all about exploiting that "innovation".


more on it laterz sometime.. inshAllah
~*~*~*~*~~*~*~*~*~

Friday, July 23, 2010

~ Soaring the Simulation

Salam alaik,

Thinking Vectors & Matrices.. its either my way or MATLAB's way..

On a semi-sarcastic side note though, Guys having C or Java background write a MATLAB script just as they'd do that in C, i.e. using loops.
MATLAB is all about vectors & matrices.. so loops could be avoided consideably.
To wit - Consider this simple example;

Lets say we've got two vectors, like so;

a = [1 2 3]' and, b = [4 5 6]'

Now if we wantna take the dot product in C, we would write something like this for loop in C;

c[i] = a[i]*b[i];

While in MATLAB its simply;

c = a'*b; %(a Transposed x b),

So, in essence it does the looping for us.. clean & simple.

Coming back to Simulations..
A cool tool for writing communication system simulations; MATLAB, offers two approaches to do so;

1. MATLAB scripting language.
2. Simulink blocksets.


The former is recommended for the proof_of_concept development usually required in academic & research projects, while the latter is for rapid prototyping in time-constrained industrial projects.
I, for one, usually use the first approach, as my work involves research & development.
The key to make a script time-efficient is to;

a. Think in vectors and matrices.
b. Avoid unnecessary loops here & there.
c. Initialize large vectors and matrices before use.

With these simple tips one could make life quite easy.

Happy scripting...

But wait..
Sometimes the curves you get from MATLAB simulations aren't smooth enough, even after several 100th of runs. I usually smooth them out using:

sgolayfilt(your_variable, m, F)
where m=2,F=21.

Result: cool looking curves, at the expense of one additional line in simulation section of your paper.

Furthermore, I also change the font size & width of the curves using;

h = plot(my_x, my_y); hold on; grid on;
set(h, 'linewidth', 3);
set(get(h, 'parent'), 'fontsize', 14);

Result: .. even cooler 
;o)

~*~*~*~*~~*~*~*~*~

Wednesday, July 21, 2010

~ Casting out the Colors

Salam alaik,

MATLAB generates cool looking colored ps-files.
Unfortunately thoguh, most of the conferences & periodicals ask for gray scale images instead.
It gives you a big pain_in_the_neck tryna find suitable colors that could be distinguished at gray-scale level, esp in cases when markers don't serve the purpose well enough.

So..
I've discovered a simple Color to gray scale trick.
How to get around it is a little more tricky.
& by the end of the toil u'll get MATLAB generated PS-files, by editing the ps file directly.

First off, search for lines similar to;

/c8 { 1.00000 0.000000 0.000000 sr} bdef

Now lets dissect down this piece by piece..

/c8: According to my calculations '/c' means color here and '8' is numbering that may vary.

{1.00000 0.000000 0.000000 sr}: The RGB values; all values should be same & less than one for grey-scale. Note that all 'zeros' mean black, and all 'ones' mean white. Darker values are harder to distinguish, so I suggest giving more gap in values chosen between 0-0.5. While, less gaps can be afforded for values between 0.5-1.0.

That little doo-dad will clear the remainder of the picture. Like so;
Here is an example of a color image;


Now ,we require 6 gray-scale values. I used [0 0.3 0.55 0.65 0.75 0.85], & VOILA!
Here is the result;


aint that a neat trick right there?
It actually isn't much of a trick..
see if u could come up with more trix.

~*~*~*~*~~*~*~*~*~

Saturday, July 17, 2010

~ Fiddling with Figures

Salam alaik,

People've got an awesome practice of saving figures in the simulation script just after results are finalized.

Its a jolly good habit for all i can tell, since it pretty much prevents a lot of future headache.

No rocket science there..
The function to save a MATLAB figure file "saveas"; can save in several formats including fig (matlab figure), bmp (bitmap - though not recommended), ai (adobe illustrator), psc2 (colored post-script - recommended for latex), so on n so forth.

Fig files are useful in another sense, i.e., the data is automatically secured with it. n i'll show you in a minute -inshAllah- how data could be extracted from the saved fig files;
  1. Open the saved .fig file using open function. e.g., open abc.fig
  2. Use gcf to get the current figure pointer/handler and save it in a variable, e.g., h = gcf
  3. Use get command to get hold of the children of the gcf, H = get(h, 'children')
  4. Finally, search for the handle of the child which containts all the plots.
  5. Suppose H(2) is the child with all the plots, then use H2 = get(H(2), 'children')
  6. Now use set(H2(i)), where i = 1 to number of plots, to list all the properties and change their values.
  7. Similarly, use the get(H2(i)) to fetch the values of all the properties.


For example, the script below extracts data from the plots.


clear all;
% open the .fig file
open test.fig; 
% get the current graph handle
h = gcf; 
% get the children of the figure file
H = get(h, 'Children');
% For this specific case the 2nd child has all the plots
H2 = get(H(2), 'Children');

Y = [];
for i = 1:length(H2)
% get the data of y-axis
    Y = [Y; get(H2(i), 'YData')];
end

Here is a test.fig, i fiddled with using the above script;


..enjoy.
n happy scripting!

~*~*~*~*~~*~*~*~*~

Thursday, July 15, 2010

~ M-ary Constellations

Salam alaik,

M-ary Phase shift keying (PSK) is not only simple but mathematically elegant too.

The symbol values are the Mth root of unity & is given like so:

exp(j.2.\pi.m/M), where m = 0, ..., M-1.


Use the same expression in MATLAB with a bit of rotation for fun :p

% the number of constellation points
M = 16;
m = 0:M-1;

% obtaining the constellation points with pi/M rotation
PSK_16 = exp(j*2*pi*m/M - j*pi/M);



Here is the plot I quickly designed; the Mth roots of unity with rotation..


Try out this 'M-ary_Quadrature_Amplitude_Modulated_Constellation' construction for yourself, & lemme know how good you go.

~*~*~*~*~~*~*~*~*~

Tuesday, July 13, 2010

~ Communication..

Salam alaik,

have been a happy man ever since the advent of VoIP..

VoIP is a wonderful thing for people whose role in life is to be on top of things.
But not for me; my role is to be on the bottom of things.
What I do takes long hours of studying and uninterruptible concentration. I try to learn certain areas of digital communications exhaustively; then I try to digest that knowledge into a form that is accessible to people who don't have time for such study.


Otoh, I need to communicate with hundreds of people all over the world as I write my periodicals.
I also want to be responsive to the people who read & review those articles and have questions or comments.

My goal is to do this communication efficiently, in batch mode --- like, one day every three months. So if you want to talk to me about any topic, please use good ol' snail mail and send a letter to my postal address..
You might also try faxing me. Chances are that it'll be seen last, perhaps once every six months instead of three.
:o)
~*~*~*~*~~*~*~*~*~

Sunday, June 06, 2010

~ G-volution

Asalam alaikum,

The other day i was thoroughly amazed to know that my audi A6 mechanic is infact a molecular biologist
:O
i asked him as to what on earth was he doing in a car-ridden garage instead?
To my unsurprise though, he pointed towards his awesomely handsome earnings, his BMW & his yemeni nationality barring him from government run high-profile specialized (& saudialized) laboratories.
He asked me to teach him english linguistic skills (on top of presenting a persian cat as a gift).
I asked him to teach me arabic instead, & keep his pet since his lil kids were all teary on their father's decision.

On the more -
I'm interested in this system;
(a want & not a need)

http://www.youtube.com/watch?v=Kyy8Z-39aOs



Returning -

Telecommunications, especially mobile communication has been through drastic changes in recent years, & there is no sign of stopping to rest anytime sooner.

Remember the days when mobile unit was hard to fit in deepest of pockets with a single technology? & now a palm device holds a whole plethora of multiple technologies!..

The vision of doing better, & faster has lead us from narrow band digital 2G, to wide-band 3G with internet access, with us knocking the doors of all IP packet switched network; Next-Gen ultra-boardband 4G - where G stands for generation & not just guesstimation.



Fourth-generation (4G) mobile systems dictate entirely new approaches & novel infrastructure solutions to seamlessly integrate the existing wireless technologies including wireless broadband (WiBro), 802.16e, CDMA, wireless LAN, Bluetooth, and etc.

The key features of 4G mobile systems can be summarized as follows.
First, 4G mobile systems are all-IP based heterogeneous networks that allow users to use any system at any time and anywhere.
Then, 4G mobile systems provide end-users with high-speed, large volume, good quality, global coverage, and flexibility to roam between different types of technologies.
Finally, 4G mobile systems provide high-data-rate services to accommodate numerous multimedia applications such as video conferencing, on-line gaming, etc.

Yet the vision still continues...

What comes up is 5G..
& what stores in for 5G?
Well, for one, one of the candidate candy ideas is the use of 'Cognition' in communicating mobile.
The vision to give emotions & feelings to the mobile set itself to sense its surroundings.

The motivation behind cognition is efficient utilization of one of the most precious (& costly for telecom companies for that matter) resources in telecom; the frequency band.  Since even at its busiest, current technology is not capable to consume the alloted band completely & every now & then chunks of this precious resource are left unused here & there; referred to as spectrum holes.

5G promises to utilize this otherwise wasted portions of frequency, by putting intelligence or cognition in a mobile set. Two types of users are envisioned in this recent paradigm; primary users, secondary users.

Primary users have priority over secondary users, i.e.; secondary users could only gobble up the leftover pieces of the pie (frequency band).
The challenge is in finding those left-overs portions, as they keep on changing their position and size.
This calls on for sensing of the environment (radio sensing), and then analyzing it (radio scene analysis) and finally predicting the next empty slot. Only then 5G technology will have the ability carryout a meaningful communication.

Cognitive Radio is the new hype..
cog. rad. band wagon is now the focus of attention & tremendous research efforts are going down this direction.

wonder how many generations will come n go..
& like ever propping up dimensions (specially after the discovery of quantum mechanics) we'll end up with like 15 G or something..

So lets just make hay while the sun shines!

~*~*~*~*~~*~*~*~*~

Friday, June 04, 2010

~ AlhamduliLLAh

Asalam alaikum,

The day is a heavy day..
i just received a reply for my application.. stating that all faculty positions are full.
AlhamduliLLAh..
'but' its hard & Allah knows..


In comparison, this weak alhamduliLLAh of mine reminds me of a lady, who lives here & worked at a local school.
I came to know that she was a widow with two sons & a daughter.
Her elder son, on whom she invested much, & who grew up to get a good education & nice job with a cool '0' meter flashy car, met with a horribly fatal accident on Yanbu highway & died on spot.
The guy was 25 & his mother was in pakistan to shop for the upcoming marriage of his engaged son.
He was burried in Makkah Mukarramah alongside his father.

Life went on..

Her daughter got married.. & the younger son grew up to be independent with a car of his own & both mother & son went to Madinah Munawwarah.
On their way back, they met with a horrible accident.. mother survived, boy din't.
He was 25, engaged & soon to be married.
When she woke up in the hospital & was able enough to bear the burden of the news, the doctors told her about it & told her to do Sabr & say 'AlhamduliLLAH', so they can proceed with the burial.
She din't say it right away.. for her grief won't let her believe..
The docs asked her to say 'AlhamduliLLAH', so they can proceed with the burial, because they couldn't proceed if not given the consent of the mother (in form of AlhmaduliLLAh).
Eventually.. she uttered AlhamduliLLah..
And it was then, that he was buried in Madinah Munawwarah.

The power of alhamduliLLAH.. & life goes on with her today.

~*~*~*~*~~*~*~*~*~

Wednesday, June 02, 2010

~ Med Shred #1


Salam alaikum,

Thought to revisit here after a sporadic hiatus owing to a bit of blogathy & more of blogstipation really.

Its been a while since I've been pestering insisting my spouse to maintain an online collection of her learning experiences. Not only will it serve as a first hand experience narrative, but may prove to be priceless resource in the long run too (inshAllah).

But, as it turns out.. there are some time issues in way of sitting & organizing thoughts, i suppose - a difficult thing indeed.

Nonetheless, every now & then i'll be posting here whatever bits I receive from her & reproduce them as is (albeit a lil face-lifting though :p) on this blog of mine, till such time i set up a new one for her own personal use.

Title of such entries will remain the same, as in; 'Med Shreds' with a sequel #.
Here goes the first one;
~~~~~~~~~~~~~~~~~~

By: Dr. Naz. S.

I got convinced lately, that there are not many informal cancer resources online. None in Riyadh that I know of.
I've been told that jotting down daily learning in a bullet form, will help boost the response in upcoming challenges.
I've also been told that if I do that, it'll be like an online encyclopedia for people to cross reference on things I've recollected over time.
So, after making a good intention, of sharing knowledge in which ever way possible for the greater benefit of humanity, I will be writing (inshAllah) from now onwards.

He was an inspirational speaker, a visionary & carried out revolutionary work in health & education sectors.
Its been long since King Faisal died an unexpected death.
But his hospital which was inaugurated in 1975, still continues to be (sadqah jariyah) one of he best in whole of the middle east, its research center being the only recognized center of excellence in the whole region (besides israel).

The other day I heard Dr saheb ask tess; "Is the new physician at her seat?.. if yes send her in!"
I kind of felt like being summoned for another viva. But times have changed. Gone are the golden soul crushing days of med school life.

The discussion that day was just about how things were going with me, & if i was finding the patient follow up work interesting at all.

Dr. Saheb, who is an Allama Iqbal med school graduate, a Brooklyn Downstate hospital trained M.D., a Medical Oncologist Consultant, was narrating how the center has achieved yet another prestigious membership of an International Cancer Research body, & the amount of effort placed into it in terms of patient follow up & data collection.

In the course, he asked me to define a one liner difference between a tumor stage & a tumor grade, also asked me to describe in a sentence whats a tumour marker, where is it produced, its role?

Then went on to ask for types & phases of clinical trial (of which i was unaware, as i am fairly new to this kind of stuff)

He gently asked me to go grab a gist of what a clinical trial is, its origin prerequisites, & get a grip of its phases etc, & get back to him with whatever i gained..



I started exploring & reading & came to know the basic salient stand points that demarcate Clinical trials on humans from those on animals.

Although it is understandable to focus on goals of contributing to the field of science, keeping in mind our society values & the rights and welfare of individuals, but it is not considered ethical behavior to use humans solely as means to an end.
So, in order to exhibit & lay down the importance of demonstrating respect for research participants, there are certain set of principles used to define ethical research and the regulations, policies, and guidance.

In my self study session for the given assignment, I came to know that the first ever concept of a Clinical Trial (more so an ethical clinical trial) was  introduced by Ibn e Seena (Aivcenna) in 1025 A.D in his bool Al-Qanoon fi al-Tibb (The Canon of Medicine).

It was a time when Muslim world was the pioneer in Research & Development.



He laid down rules for the experimental use and testing of drugs on human subjects, and wrote a precise scientific guide for practical experimentation for discovering and proving the effectiveness of medical drugs.
Ibn Abd Allah ibn Sina simple rules and principles for testing the effectiveness of new medications form the basis of modern clinical trials:
  • The drug must be free from any extraneous accidental quality.
  • It must be used on a simple, not a composite, disease.
  • The drug must be tested with two contrary types of diseases, because sometimes a drug cures one disease by its essential qualities and another by its accidental ones.
  • The quality of the drug must correspond to the strength of the disease. For example, there are some drugs whose heat is less than the coldness of certain diseases, so that they would have no effect on them.
  • The time of action must be observed, so that essence and accident are not confused.
  • The effect of the drug must be seen to occur constantly or in many cases, for if this did not happen, it was an accidental effect.
  • The experimentation must be done with the human body, for testing a drug on a lion or a horse might not prove anything about its effect on man.

Qanoon (which means "law" in Arabic), the Canon of Medicine remained a medical authority up until early 19th century. It set the standards for medicine in Europe and the Islamic world, and is Abu Ali ibn AbduLLAh's most renowned written work alongside Kitab al-Shifa (The Book of Healing).
Qanoon was used at many medical schools—at University of Montpellier, France for instance, as late as 1650, to understand the basis & ethics of research. Much of the book was also translated into Chinese as the Huihui Yaofang (Prescriptions of the Hui Nationality). The Canon also formed the basis of Unani medicine, a form of traditional medicine practiced in subcontinent.
The principles of medicine described by the Qanoon ten centuries ago are still taught at UCLA and Yale University, among others, as part of the history of medicine.

Then I came to know that physician Frederick Akbar Mahomed of subcontinent origin, who worked at Guy's Hospital in London made substantial contributions to the study of high blood pressure during his short professional career from 1872 to 1884, when he died at the age of 35.
In the process of clinical trials during his detailed clinical studies, he separated chronic nephritis with secondary hypertension from what we now term in medical as 'essential hypertension'.
He also founded 'the Collective Investigation Record for the British Medical Association'; this organization collected data from physicians practicing outside the hospital setting (extramural) and was the precursor of modern collaborative clinical trials & medical transcription.

Another famous clinical trial was James Lind's demonstration in 1747 that citrus fruits cure scurvy disease. He compared the effects of various different acidic substances, ranging from vinegar to cider, on groups of afflicted sailors, and found that the group who were given oranges and lemons had largely recovered from scurvy after 6 days.

Dr. Saheb asked me to take a 3 hours online certification exam on 'Protecting Human Research Participants in clinical trials.'
It was basically a test of medical ethics, mainly regarding how to be gentle, generous & at the same time meticulous with your patients.
Questions revolved around some basic qualities like JusticeBeneficence & Respect for persons, their medical rights, their Anonymity & their Autonomy.
I scored 20 out of 21 (alhamduliLLAh).

Its just the beginning of the journey full of learning & serving & sawab (hopefully)

~*~*~*~*~~*~*~*~*~