# The lost illustration

Philosophy is written in a great book that is continually open before our eyes (I say the universe), but it cannot be understood unless one first learns to decipher the language and the characters in which it is written. It is written in a mathematical language, and the characters are triangles, circles, and other geometric figures, without which it is impossible for us to understand a word of it; without them it is a vain wandering through a dark labyrinth.

Galileo Galilei, Il Saggiatore

The geometry of the backbone (or main chain) of a peptide is completely described by a sequence of dihedral angles (also known as torsion angles): the angle Φ is the angle around the chemical bond between the alpha carbon of one amino acid and the azote of the same amino acid; the angle Ψ is the angle around the axis of the bond between the alpha carbon and the other carbon (I call it beta carbon, but this is a personal notation) of the same amino acid. This definition is incomplete, of course, because as we all know, a dihedral angle is defined not only by an axis but also by two planes that intersect in that axis. Not only that, these two angles have a sign, so we must specify a positive arrow of rotation. This can be done in several ways. The problem is that the most efficient way would be by just drawing the planes the torsion angles are defined by. Now, through the years I discovered that this drawing is usually lacking in books, leading to some confusion, particularly in those who study biochemistry without a particular interest in a quantitative description of molecular structures. In Figure 1 you find the graphical description of Φ and Ψ in a well-know book of biochemistry. Do you see the planes the angles are defined by? In Figure 2, two further examples of illustrations that are not suited at completely describing the two dihedral angles, from a two other well-know books, one about bioinformatics, the other one a booklet about protein structures. The second one is the best one, but you still have to mentally merge two drawings (FIG. 5 and FIG. 6) to get the full picture. I hope I won’t be sued…

Now, it is possible that I have just been unlucky with the books of my personal library. Or it may be that the illustration with the three planes we need to correctly define Φ and Ψ (we just need to add a plane to the amide planes), would not be clearly readable. I tried years ago to draw the planes for Ψ (the illustration is in this blog post) and I have now completed it with the other torsion angle, by drawing a tripeptide (Figure 3). It is just a handmade drawing, but I think it serves the scope. This is the lost illustration.

# Diario di bordo

Oggi il mare è una distesa serena, le onde sono dei bambini che non crescono: nascono, baluginano e muoiono. La vela è una donna gravida, rotonda di vento, senza strappi. La rotta è sempre incerta, però almeno mi muovo.

Tornato a Itaca, l’ho trovata vuota. La vita di allora è vissuta altrove, ha continuato lontano da lì; o si è estinta molti anni fa.

Itaca ora è una casa abitata dal silenzio che è cresciuto sicuro che non facessi ritorno, con l’arroganza di una pergola selvaggia; sui sogni, le speranze, e tra le pagine dei libri.

Allora ho assecondato il vaticinio di Tiresia: baciata l’isola petrosa, l’ho affidata alla memoria. Ancora una volta e per sempre.

# Awakenings

This documentary, filmed by Duncan Dallas of Yorkshire Television in 1973, reports on a very peculiar group of patients gathered at Mount Carmel, a chronic hospital raised just after the First World War in the neighborhood of New York.

These patients were survivors of a pandemic that spread around the world between 1916 and 1927. The pathogen (never identified for sure) left them with damages in the mesencephalon and/or basal ganglia that affected the dopaminergic nuclei and their ascending projections (Von Economo 1931), (Rail D et al. 1981), (Kiley M et Esiri MM 2001). These lesions resulted in a form of severe Parkinsonism associated – at least in some cases – with some of the worst examples of apathy, a condition in which the physiological flow of thoughts is frozen. Apathy is exemplified, in the documentary, particularly by the case of Sylvia Schneider (15:02), who went under the fictional name of Rose R. in the book (see below).

These patients were the subjects of a celebrated book, by the same title, by Oliver Sacks, the neurologist who cared for them. Sacks made an attempt at treating them, by administering the drug L-Dopa starting from the summer of 1969, with some miraculous results (awakening some of the patients, literally), followed by heavy falls into the statue-like state, in some of the cases. The documentary is about their struggle to come back to life, after decades.

They [the patients] encouraged me, earlier, about publishing the book: ‘Go ahead; tell our story – or it will never be known’. And now they said: ‘Go ahead; film us. Let us speak for ourselves’

The character of Lucy from the movie Awakenings (1990) seems also largely based on the story of Sylvia Schneider. See the following clip from Awakenings:

Oliver Sacks about the individuals depicted in this documentary:

A meaningful quote from the book Awakenings:

Some of these patients had achieved a state of icy hopelessness akin to serenity: a realistic hopelessness, in those pre-DOPA days: they knew they were doomed, and they accepted this with all the courage and equanimity they could muster. Other patients (and perhaps, to some extent, all of these patients, whatever their surface serenity) had a fierce and impotent sense of outrage: they had been swindled out of the best years of life; they were consumed by the sense of time lost, time wasted; and they yearned incessantly for a twofold miracle – not only a cure for their sickness, but an indemnification for the loss of their lives. They wanted to be given back the time they had lost, to be magically replaced in their youth and their prime.

Introduction

Let’s consider the relative humidity we have right now in Venice, Italy: 97% with a temperature of 8°C and a pressure of 755 mmHg. Pretty humid, right? What about a warm place, let’s say Buenos Aires, in Argentina? Right now they have a relative humidity of 55%, at a temperature of 23° and a pressure of 760 mmHg. Now, which place is more humid, between these two? In other words: in which of these two places the same volume of air contains the biggest amount of water? Are you sure you know the answer?

Some definitions and a formula

Rlative humidity is defined as follows

$RH\;=\;100\cdot\frac{e'}{e'_w}$

where ${e'}$ is the partial pressure of water vapour in air and $e'_w$ is the saturation vapour pressure with respect to water (the vapour pressure in air in equilibrium with the surface of water). We then have

$e'_w(p,t)\;=\;(1.0016\;hPa+3.15\cdot 10^{-6} p-\frac{0.074}{p}\;hPa^{2}) 6.112\cdot e^{\frac{17.62t}{243.12+t}}$

Here and in what follows we express pressure in hPa, with $hPa\;=\;10^2 Pa$, while $t$ is temperature in °C and $T$ is temperature in $K$, with $T\;=\;273.15+t$. Absolute humidity is simply given by

${\rho}_v\;=\;\frac{m_v}{V}$

where $m_v$ is the mass of vapour and $V$ is the total volume occupied by the mixture (Ref, chapter 4).

Physics of gasses

From the law of perfect gasses and considering that, according to Dalton’s law, in a moisture the partial pressure of each gas is the pressure it would have if it occupied the whole volume (Ref), we can also write

$e'\;=\;m_v\cdot R_v\frac{273,15 + t}{V}$

with $R_v\;=\;4.614\cdot\frac{hPa\cdot m^3}{kg\cdot K}$. Then, by substituting $e'$ and $m_v$ in ${\rho}_v$, we have

${\rho}_v\;=\;\frac{RH}{100\cdot R_v\cdot (273.15+t)}(1.0016\;hPa+3.15\cdot 10^{-6} p-\frac{0.074}{p} \;hPa^{2}) 6.112\cdot e^{\frac{17.62t}{243.12+t}}$

At the end of this post you find a simple code in Octave that calculates this formula and the plot.

If we apply now the equation for ${\rho}_v$ to the enviromental parameters relative to Venice, we find that one $m^3$ of air contains 8 grams of water; if we repeat the same calculation for Buenos Aires we find that the same volume of air contains 11 grams of water. In other words, today Venice is less humid than Buenos Aires in the same period, if we refer to the content of water of the air.

In the diagram below you can see the plot of absolute humidity in function of the temperature, for three values of relative humidity. So, for instance, 20 $\frac{g}{m^3}$ of water corresponds to a RH of 90% at a temperature of 24°C and to a RH of only 50% at a temperature of 35°C. The reason for this, beyond the mathematical formulae, is obvious: when the temperature of the air decrases, the ability of the moisture to retain water as vapour decreases accordingly.

Conclusion

Relative humidity is relevant for the subjective perception of heat (the more the relative humidity, the more difficult it is sweating for human beings, then the higher it is the perception of heat since we use sweating for cooling down). But if we are interested in the interaction of air and our lungs, for instance, relative humidity might be completely misleading and absolute humidity is likely the parameter to be considered (R).

The script

% file name = absolute_humidity
% it calculates the absolute humidity given the relative humidity and the temperature
clear all
% constant for water vapour (J/kg*K)
Rv = 461.4;
% relative humidity (%), temperature (°C), pressure (mmHg)
RH = 55
t = 23
pHg = 760
% conversion to Pa (1 mmHg = 133.322365 Pa)
p = pHg*133.322
% conversion to hPa=100Pa
p = p/100;
Rv = 4.614;
% absolute humidity (kg/m^3)
AH = (RH/(100*Rv*(273.15+t)))*(1.0016+3.15*10^(-6)*p-0.074/p)*6.112*e^(17.62*t/(243.12+t))
% we now fix the RH and plot AH for variuos values of t
RH = 50
pHg = 760
p = pHg*133.322;
p = p/100;
for i=1:30
t2(i)=i+5;
AH2(i) = 1000*(RH/(100*Rv*(273.15+t2(i))))*(1.0016+3.15*10^(-6)*p-0.074/p)*6.112*e^(17.62*t2(i)/(243.12+t2(i)));
endfor
plot (t2, AH2,’-k’,’LineWidth’,3)
grid on
grid minor
hold on
RH = 70
for i=1:30
t2(i)=i+5;
AH2(i) = 1000*(RH/(100*Rv*(273.15+t2(i))))*(1.0016+3.15*10^(-6)*p-0.074/p)*6.112*e^(17.62*t2(i)/(243.12+t2(i)));
endfor
plot (t2, AH2,’-r’,’LineWidth’,3)
hold on
RH = 90
for i=1:30
t2(i)=i+5;
AH2(i) = 1000*(RH/(100*Rv*(273.15+t2(i))))*(1.0016+3.15*10^(-6)*p-0.074/p)*6.112*e^(17.62*t2(i)/(243.12+t2(i)));
endfor
plot (t2, AH2,’-b’,’LineWidth’,3)
xlabel (‘temperature (°C)’)
ylabel (‘absolute humidity (g/{m^3})’)
legend (‘AH for RH = 50%’,’AH for RH = 70%’,’AH for RH = 90%’, ‘location’, ‘NORTHWEST’ )

The equations of this blog post were written using $\LaTeX$.

# Six Months

So, it seems that I am improving again. Six months ago I came back from Argentina, where I spent the boreal winter. I felt better there, as I usually do during summer, in Italy. Feeling better means being able to think, to read, to do calculations, to draw. To exist, in one word. And also to move around a bit, which is not truly relevant for me, though.

I came back to Italy at the end of March (blog post), sure that I would have had other months of improvement ahead of me, given that we were at the beginning of Spring. But it hasn’t been the case, I got worse: For six months I haven’t thought, and I have been living horizontally, in silence. There were days in which it seemed that I was starting to improve (like when I recorded this video), but then it didn’t last. I can’t remember these six months, in my subjective time they sum up to a week or less.

Not sure why it happened: perhaps the 48 hours of the chaotic journey back to Italy damaged me so badly that it took half a year for me to regain the status quo ante, or maybe the strange flu I got in March, while in Argentina, made the disease worse. In the life of an ordinary person, this would be a rather exceptional episode, for me it is the rule: the improvements are the rare exception. I have lived like that since I was 20.

And now, because I usually get worse at the end of September, I know that I am about to start my descend to Hell again. And this time I can’t move to the austral hemisphere, because of the pandemic. So what am I supposed to do in the few days of life I have left? I’ll do what I have always wanted to do: applied maths and drawing, with only very short term goals. Something that I can finish.

I share these private vicissitudes only because I think that it is important to let the world know about this struggle. It seems unlikely that I can discover the reason why this curse has stricken my life, but I will continue studying this phenomenon: most of what I study, when I can, is about new tools to apply to my own biology.

# My first time with LaTeX

Each mathematical formula I have used in my blog till now was an image: I wrote them in a Word document using the equation editor by Microsoft (that I like very much), then I captured the screen and saved it as an image and then I uploaded them in my blog.

In the past, I tried to find a way to write them as text, without succeeding. But in fact, it is possible, using the LaTeX syntax and a few HTML commands.

These are the first “true” mathematical formulae present in this blog. I will use this page to test the LaTeX syntax for mathematical expressions (a handbook is available here).

$\int_{A_1}\int_{A_2}\frac{\partial \Psi(x,y)}{\partial x}dxdy$

$i\hbar\frac{\partial}{\partial t}\left|\Psi(t)\right>=H\left|\Psi(t)\right>$

A symbol within the paragraph: $\pi$. A inequality within the paragraph: $x_i>0$. This is an example of an expression with a pedix that has a pedix: $f_{X_1}$.

# The time machine

I am aware that these are just messages floating in the silence, stored somewhere in the planet as binary numbers. I am writing to myself, mainly, from my remote hiding place.

I have travelled through ages, without really being part of them. All alone with my problem. As a patient with a rare disease that doesn’t even have a proper description, I do not belong to humankind.

But humans have paradoxical behaviours, they care more about a man who lived five thousand years ago in the north of Italy, trapped in the ice of our highest mountains, than of clochards that live right now in pain and loneliness in their community. So it might be that generations from now, someone will find these notes, an archaeologist who will try to build my story, from fragments of what I left behind: drawings and calculations. Mathematics is a universal language, after all, and to some extent, even art is universal; not always but often, good art is forever.

If I fail my mission, history will never record my existence. But it might be that at some point in the future someone will find these notes frozen in the ice of a planet long forgotten by humans themselves, as we now have forgotten Africa, the place we all come from.

# Why I study my own disease

In evidenza

A lot of patients have asked me why I use my little energies to study my disease, instead of just waiting for science to conquer it.

There are many reasons, the first one being that I am desperate because of the cognitive disability that is worse than death. I am not concerned about the physical limitations, at all, even though I have been mostly housebound for the last 20 years. Another reason is that I like computational biology, and I started studying engineering before getting sick with the idea of switching to bioengineering after graduating. So, this is my job.

The other point is that even though I fit the criteria for ME/CFS, I have a rare disease, granted that ME/CFS is not a rare disease: it has a prevalence of 0.4% according to some studies, so it is relatively common. Then why am I a rare patient? Let’s do some calculations: since the median age at onset is 36.6 years with a standard deviation of 12.3 years, the proportion of males is 19% and the proportion of those who are housebound for most of their disease is 25% (R), the probability for a ME/CFS patient of having my same characteristics is (assuming that these are all independent random variables) given by p=0.0075. So, less than 1 out of 100 ME/CFS patients has my type of illness. If we consider also that pain or aching in muscles is present in 59% of patients and it is mostly absent in my case, the above-mentioned probability is even lower: p=0.0031. Which means that only 3 ME/CFS patients out of 1’000 have my illness.

Taken all these data together, the prevalence of my disease in the general population becomes 1/100’000, which means that I have a rare disease, according to the European definition (where a disease is defined rare if it has a prevalence ≤1/2’000) [R]. In the US a disease is defined rare only if it has a prevalence ≤1/200’000, though [R].

And besides that, it is pretty obvious that I am a unique case. I have never found a patient like me, so far. It can also be noted that in Italy, given a population of 60 million inhabitants, those who have my condition are only 600. This might be the reason why I haven’t met them, yet.

This means that I am probably the only one who is studying my disease, on the planet! This is why I’m doing what I’m doing.

Above, my personal book of immunology, built page by page, paper by paper. I have three other books about this discipline. One of them was a gift from a neurologist that perhaps thought that gift was the only thing she could do to save me. Another one is a very sophisticated text on cutting edge immunology. But this one is the best one because I have selected and read each one of its pages. It is by no means a complete book, it is mainly focused on B cells and B cell autoimmunity, but it has been very useful.

I have built several other books like this, on computational methods in immunology, on metabolism, on neurosciences, on microbiology, and on some diseases: Lyme, ME/CFS, mast cell activation, POTS…

I have learned a great deal, even though outside academia. But I had no choice, I have been too sick and too slow to study at university: I had only a few weeks in which I could study, and then months or years in which I had to wait. This has been my routine. Moreover, given the lack of energy and time, I had to study only what was truly important for my health. Because my goal was to cure myself and save me from a lifetime of cognitive disability.

# Testing hypotheses

Introduction

My ME/CFS improves during summer, in the period of the year that goes from May/June to the end of September. I don’t know why. I have several hypotheses. One possible reason for the improvement in summer is an interaction between the light from the Sun and some parts of my physiology, the immune system for instance. We know that ME/CFS tends to have an oscillating course in most of the patients (Chu L. et al. 2019), but the presence of a seasonal pattern in this patient population has not been investigated so far, to my knowledge. And yet, if you ask directly to patients, many of them say that they feel better in summer. Unfortunately, we don’t have scientific data on that, this is an area worth investigating with some carefully done survey.

Seasonal variation of the immune system

The immune system has a high degree of variation for several reasons (Brodin P et Davis MM 2017). In particular, there are studies about the seasonal fluctuations in the expression of some crucial genes of the immune response (Dopico XC et al. 2014).

How does this regulation happen? Different mechanisms are possible, some of them might be related to changes in the light we receive from the Sun as the Earth rotates around it. We know that the length of the day has an effect on innate immunity: the more the hours of light, the lower the power of the innate immune system (Pierre K. et al. 2016). We also know that ultraviolet radiation, particularly UVB, is an agonist for the aryl hydrocarbon receptor (AhR) (Navid F. et al. 2013). This receptor seems to reduce the expression of the major histocompatibility complex II (MHC II) in dendritic cells (DCs), thus reducing their antigen-presenting activity (Rothhammer V. et Quintana F.J. 2019). UVB might be able to reach dendritic cells when they are circulating near the skin, during summer, thus inhibiting their antigen-presenting activity. Infrared radiation, on the other hand, seems to have an effect on energy metabolism: in Fall we lose a significant amount of infrared radiation in a wavelength range (0.7-1.0 nm) that is known to have an effect on mitochondrial activity (Nguyen L.M. et al. 2013) and it might perhaps have an indirect effect on immunity too.

As further proof of seasonal fluctuation in immunity, some immunological diseases have this kind of seasonality: Rheumatoid arthritis (Nagamine R. et al. 2014) and Rheumatic fever (Coelho Mota C.C. et al. 2010) are two examples. Moreover, the prevalence of Multiple Sclerosis is directly proportional to the latitude (Simpson S. et al. 2011). We also know that there is seasonal fluctuation in serum autoantibodies (Luong T.H. et al. 2001).

Of course, sunlight might be just one of the variables into play. The other aspect I am considering is the seasonal distribution of some common pathogens. Streptococcus, Enteroviruses and Fungi of the genus Penicillium are known to have a seasonal distribution with a peak in Fall and/or Winter (Ana S.G. et al. 2006), (Salort-Pons M et al. 2018), (Coelho Mota C.C. et al. 2010). Common influenza has this pattern too. Rheumatic fever, a disease due to an abnormal immune response to Streptococcus, has its flares in Fall because Streptococcus is more common in that period of the year (Coelho Mota C.C. et al. 2010). Even the composition of the gut microbiota has a seasonal pattern (Koliada A. et al. 2020). I am currently investigating my immunosignature, measured with an array of 150.000 random peptides, to see if I can find some relevant pathogen in my case. You can find this study here.

(A few months after I wrote these notes a pivotal study has been published on these same topics, avalilable here).

An experiment

I moved from Rome (Italy) to Rosario (Argentina) at the beginning of January. I was very sick and I steadily improved after about 40 days. I became a less severe ME/CFS patients and I could work several hours a day and care for myself, granted that I did not exceed with aerobic exercise. At the end of March, I started deteriorating as it usually happens at the end of September, when I am in Rome. In order to study this phenomenon, I have built a complete model of solar radiation at sea level, which considers the inclination of sunrays in function of the latitude and of the day of the year. It takes into account the effect of the atmosphere (both diffusion and absorption) and the eccentricity of the orbit (Maccallini P. 2019). If you look at the figure below (a byproduct of my mathematical model) you can see that when I started deteriorating in Rosario, the power of sunrays at noon in that city was still as high as it is in Rome during the summer solstice (this is due to the fact that the Earth is closer to the Sun in this period and to the fact that Rosario is closer to the Equator than Rome is).

So I have to discard the original idea that the power within the infrared range, or the ultraviolet radiation, or the visible one is responsible for my improvement in summer. If I still have to consider that sunlight has something to do with my improvement, I must conclude that it is the length of the day the relevant parameter: I may need more than 12 hours of light to feel better. Why? Because the longer the day, the lower the strength of the innate immunity. This is now my working hypothesis and I will start from the following mathematical model to pursue this research: (Pierre K. et al. 2016).

I will also use full-spectrum lamps early in the morning and in the evening to reproduce a 15 hours day, so to dampen down my innate immune system in a safe, drug-free way. I have to reproduce a day of 15 hours and see what happens. In the figure below the hours of the day at dawn and at dusk and the length of the day for Rome, for each day of the year (this is also a plot from my model).

What follows is the script I have coded in order to plot the first figure of this post. More details on this model of solar radiation are here: (Maccallini P. 2019). As a further note, I would like to acknowledge that I started pursuing this avenue in the summer of 2009: I was building the mathematical model of solar radiation (see figure below, made in 2009) but as the summer finished, I turned into a statue and I had to stop working on it. When I improved, about a year later I started working on the systematic analysis of the mechanical equilibrium of planar structures (it is a chapter of this book). I am proud of that analysis, but it has not been very useful for my health…

% file name = sun emissive power sea level Rosario vs Roma
% sun emissive power per unit area, per unit wavelength at sea level
clear all
% three parameters of the orbit
A = 6.69*( 10^(-9) ); % 1/km
B = 1.12*( 10^(-10) ); % 1/km
delta = pi*313/730;
% the two parameters of Plunk's law
C_1 = 3.7415*( 10^(-16) ); % W*m^2
C_2 = 1.4388*( 10^(-2) ); % mK
% Stefan-Boltzmann parameter ( W/( (m^2)*(K^4) ) )
SB = 5.670*( 10^(-8) );
% radius of the photosphere (m)
R_S = 696*(10^6); % m
% temperature of the photosphere (K)
T_S = 5875;
% conversion of units of measurments
N = 20; % dots for the equator
R = 3.8; % radius of the orbit
ro_E = 1.3; % radius of the earth
lambda_Rosario = -32*pi/180; % latitude of Rosario (radiants)
lambda_Roma = 41*pi/180; % latitude of Rome (radiants)
delta = 23.45*pi/180; % tilt angle
% the array of theta
theta(1) = 0; % winter solstice (21/22 December)
i_ws = 1;
day = 2*pi/365;
days = [1:1:366];
for i = 2:366
theta(i) = theta(i-1) + day;
if ( abs( theta(i) - (pi/2) ) <= day )
i_se = i; % spring equinox (20 March)
endif
if ( abs( theta(i) - pi ) <= day )
i_ss = i; % summer solstice (20/21 June)
endif
if ( abs( theta(i) - (3*pi/2) ) <= day )
i_ae = i; % autumn equinox (22/23 September)
endif
endfor
% the array of the radius (m)
for i=1:1:366
o_omega (i) = (10^3)/[ A + ( B*sin(theta(i) + delta ) ) ]; % m
endfor
% the array of the wavelength in micron
N = 471;
L(1) = 0.3;
L(N) = 5.0;
delta_L = ( L(N) - L(1) )/(N-1);
for j = 2:N-1
L (j) = L(j-1) + delta_L;
endfor
% the array of beta*L
% the array of L in metres
L_m = L*( 10^(-6) );
% angle psi
psi(1) = 0;
minute = pi/(12*60);
for i = 2:(24*60)+1
psi(i) = psi(i-1) + minute;
endfor
% -----------------------------------------------------------------------------
% Rosario
lambda = lambda_Rosario
% angle between n and r at noon in Rosario
for i= [i_ws, i_ae, i_ss, i_se]
for j=1:(24*60) + 1
% scalar product between n and r
scalar_p(j) = [cos(lambda)*sin(psi(j))*cos(delta) + sin(lambda)*sin(delta)]*( -cos(theta(i)) )+ [(-1)*cos(lambda)*cos(psi(j))]*( -sin(theta(i)) );
endfor
% value of psi at noon
for j=1:(24*60) + 1
if ( ( scalar_p(j) ) == ( max( scalar_p ) ) )
j_noon = j;
psi_noon (i) = psi(j);
endif
endfor
% angle between n and r at noon
cos_gamma (i) = scalar_p(j_noon);
endfor
% the array of the emissive power (W/(m^2)*micron) in Rosario
for i = i_se:i_se
for j=1:N
num = C_1*( (R_S)^2 );
den = ( (L_m(j)^5)*( (e^(C_2/( L_m(j)*T_S ))) - 1)*( (o_omega(i))^2 ) )*10^6;
power(j,i) = ( num/den )*( e^(-S(j)/cos_gamma (i)) );
endfor
% plotting
plot (L (1:N), power(1:N,i), '-r', "linewidth", 2)
xlabel('wavelenght ({\mu})');
ylabel('W/m^{2}{\mu}');
axis ([0.3,5,0,1500])
grid on
endfor
hold on
% -----------------------------------------------------------------------------
% Rome
lambda = lambda_Roma
% angle between n and r at noon in Rosario
for i= [i_ws, i_ae, i_ss, i_se]
for j=1:(24*60) + 1
% scalar product between n and r
scalar_p(j) = [cos(lambda)*sin(psi(j))*cos(delta) + sin(lambda)*sin(delta)]*( -cos(theta(i)) )+ [(-1)*cos(lambda)*cos(psi(j))]*( -sin(theta(i)) );
endfor
% value of psi at noon
for j=1:(24*60) + 1
if ( ( scalar_p(j) ) == ( max( scalar_p ) ) )
j_noon = j;
psi_noon (i) = psi(j);
endif
endfor
% angle between n and r at noon
cos_gamma (i) = scalar_p(j_noon);
endfor
% the array of the emissive power (W/(m^2)*micron) in Rosario
for i = [i_ae, i_ss]
for j=1:N
num = C_1*( (R_S)^2 );
den = ( (L_m(j)^5)*( (e^(C_2/( L_m(j)*T_S ))) - 1)*( (o_omega(i))^2 ) )*10^6;
power(j,i) = ( num/den )*( e^(-S(j)/cos_gamma (i)) );
endfor
endfor
hold on
plot (L (1:N), power(1:N,i_ae), '-k', "linewidth", 2)
plot (L (1:N), power(1:N,i_ss), '--k', "linewidth", 2)
legend ('spring equinox in Rosario', 'autumn equinox in Rome', 'summer solstice in Rome', "location",'NORTHEAST')
hold on
plot ([0.4,0.4], [0,1500], '--k', "linewidth", 1)
plot ([0.7,0.7], [0,1500], '--k', "linewidth", 1)