Is there a convention for MJD with a leap second?
I think not.
See http://www.ucolick.org/~sla/leapsecs/timescales.html
Also not that POSIX time_t suffers from the same problem.
-ch
In message: 004601c60ef9$e834ae50$9501000a@fakie
"Christopher Hoover" ch@murgatroid.com writes:
:
: > Is there a convention for MJD with a leap second?
:
: I think not.
:
: See http://www.ucolick.org/~sla/leapsecs/timescales.html
:
: Also not that POSIX time_t suffers from the same problem.
I've had many heated arguments with co-workers about what the right
thing to do here. Do you compute the day as if it had an extra
second, thus breaking the ability to subtract two MJD numbers to get a
meaningful elapsed time? Or, do you ignore the leap second entirely,
giving discontinuity around the leap second?
In the end, we opted to report MJD and HH:MM:SS.
Warner
Does anyone have a piece of C (BASIC, whatever) code that turns an array of
dBc/Hz values into integrated RMS noise?
I'm trying to use a simple rectangular integrator to divide a log-log plot
into "bins":
for (i=L_column; i < U_column-1; i++)
{
sum += ((value[i] - ((value[i] - value[i+1]) / 2.0)) *
(frequency[i+1] - frequency[i]));
}
This just takes the midpoint dBc/Hz value between successive columns of a
phase-noise plot, multiplies it by the frequency step between the columns in
question, and sums the result for all columns in the range of interest.
The output of this process, when I feed a typical noise graph with values
around -110 dBc/Hz to it, with frequency values at the lower and upper
limits of 1000 and 10000 Hz, is around -1E+6. What I'd like is a value
corresponding to the "-63 dBc" value cited on pages 7 and 8 in this Zarlink
app note:
http://assets.zarlink.com/CA/Phase_Noise_and_Jitter_Article.pdf
In this note, the author shows a noise curve similar to the ones I'm working
with, and magically pulls -63 dBc out of the ether with no explanation of
the integration process that obtained it. (What does it mean, in the
author's words, to take the area "under" a phase-noise curve, anyway?
What's the bottom dBc/Hz value?)
Being from the instant-gratification generation, I really don't want (and
won't understand) a calculus lecture. I want the 5 lines of code that do
the integration. :-) This is for the next release of my freeware GPIB
noise-measurement app, so your karma will be integrated along with the noise
if you're able to help!
-- john, KE5FX
Never mind, I think I see what's wrong... you can't integrate the dBc/Hz
values directly. You have to turn them back into linear ratios, do the
interval sum, and then, if you want dBc coming out, take 10*log10(sum).
-- john, KE5FX
-----Original Message-----
From: time-nuts-bounces@febo.com [mailto:time-nuts-bounces@febo.com]On
Behalf Of John Miles
Sent: Monday, January 02, 2006 12:00 AM
To: Discussion of precise time and frequency measurement
Subject: [time-nuts] Help w/integration problem
Does anyone have a piece of C (BASIC, whatever) code that turns
an array of
dBc/Hz values into integrated RMS noise?
I'm trying to use a simple rectangular integrator to divide a log-log plot
into "bins":
for (i=L_column; i < U_column-1; i++)
{
sum += ((value[i] - ((value[i] - value[i+1]) / 2.0)) *
(frequency[i+1] - frequency[i]));
}
This just takes the midpoint dBc/Hz value between successive columns of a
phase-noise plot, multiplies it by the frequency step between the
columns in
question, and sums the result for all columns in the range of interest.
The output of this process, when I feed a typical noise graph with values
around -110 dBc/Hz to it, with frequency values at the lower and upper
limits of 1000 and 10000 Hz, is around -1E+6. What I'd like is a value
corresponding to the "-63 dBc" value cited on pages 7 and 8 in
this Zarlink
app note:
http://assets.zarlink.com/CA/Phase_Noise_and_Jitter_Article.pdf
In this note, the author shows a noise curve similar to the ones
I'm working
with, and magically pulls -63 dBc out of the ether with no explanation of
the integration process that obtained it. (What does it mean, in the
author's words, to take the area "under" a phase-noise curve, anyway?
What's the bottom dBc/Hz value?)
Being from the instant-gratification generation, I really don't want (and
won't understand) a calculus lecture. I want the 5 lines of code that do
the integration. :-) This is for the next release of my freeware GPIB
noise-measurement app, so your karma will be integrated along
with the noise
if you're able to help!
-- john, KE5FX
time-nuts mailing list
time-nuts@febo.com
https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
From: "John Miles" jmiles@pop.net
Subject: Re: [time-nuts] Help w/integration problem
Date: Mon, 2 Jan 2006 00:49:19 -0800
Message-ID: PKEGJHPHLLBACEOICCBJGEOCGBAA.jmiles@pop.net
Never mind, I think I see what's wrong... you can't integrate the dBc/Hz
values directly. You have to turn them back into linear ratios, do the
interval sum, and then, if you want dBc coming out, take 10*log10(sum).
You are almost there... you need to square the linears sum, which is quickly
done...
sum = 0
sum = sum + pow(10,value[1]/10)
sum = sum + pow(10,value[2]/10)
...
sum = sum + pow(10,value[n]/10)
rms = sqrt(sum)
dBc = 10 * log10(sum)
Normally you would use pow(10,value[1]/20) etc. to get the amplitudes back, but
RMS is about summing the power and that is the amplitude square as you recall.
Hmm... I'm less a math-freak this morning than usual. A good morning it is
anyway.
Cheers,
Magnus
-- john, KE5FX
-----Original Message-----
From: time-nuts-bounces@febo.com [mailto:time-nuts-bounces@febo.com]On
Behalf Of John Miles
Sent: Monday, January 02, 2006 12:00 AM
To: Discussion of precise time and frequency measurement
Subject: [time-nuts] Help w/integration problem
Does anyone have a piece of C (BASIC, whatever) code that turns
an array of
dBc/Hz values into integrated RMS noise?
I'm trying to use a simple rectangular integrator to divide a log-log plot
into "bins":
for (i=L_column; i < U_column-1; i++)
{
sum += ((value[i] - ((value[i] - value[i+1]) / 2.0)) *
(frequency[i+1] - frequency[i]));
}
This just takes the midpoint dBc/Hz value between successive columns of a
phase-noise plot, multiplies it by the frequency step between the
columns in
question, and sums the result for all columns in the range of interest.
The output of this process, when I feed a typical noise graph with values
around -110 dBc/Hz to it, with frequency values at the lower and upper
limits of 1000 and 10000 Hz, is around -1E+6. What I'd like is a value
corresponding to the "-63 dBc" value cited on pages 7 and 8 in
this Zarlink
app note:
http://assets.zarlink.com/CA/Phase_Noise_and_Jitter_Article.pdf
In this note, the author shows a noise curve similar to the ones
I'm working
with, and magically pulls -63 dBc out of the ether with no explanation of
the integration process that obtained it. (What does it mean, in the
author's words, to take the area "under" a phase-noise curve, anyway?
What's the bottom dBc/Hz value?)
Being from the instant-gratification generation, I really don't want (and
won't understand) a calculus lecture. I want the 5 lines of code that do
the integration. :-) This is for the next release of my freeware GPIB
noise-measurement app, so your karma will be integrated along
with the noise
if you're able to help!
-- john, KE5FX
time-nuts mailing list
time-nuts@febo.com
https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
time-nuts mailing list
time-nuts@febo.com
https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
Thanks; yes, I've got the sqrt() part already, from both my original source
who requested the feature, and the Zarlink app note.
Naturally, the two sources don't agree. Equation 13 (and others) in the
Maxim app note at http://pdfserv.maxim-ic.com/en/an/AN3359.pdf says, in
effect:
RMS = sqrt(sum * 2)
On page 7 of the Zarlink app note, the x2 factor is left outside the radical
sign:
RMS = sqrt(sum) * 2
Unlike the question of whether to interpolate the column midpoints in dBc
space or linear spectral-density space, the position of that x2 term makes a
big difference in the final result. Any insights into who's got THAT one
right?
-- john, KE5FX
-----Original Message-----
From: Magnus Danielson [mailto:cfmd@bredband.net]
Sent: Monday, January 02, 2006 1:28 AM
To: time-nuts@febo.com; jmiles@pop.net
Subject: Re: [time-nuts] Help w/integration problem
From: "John Miles" jmiles@pop.net
Subject: Re: [time-nuts] Help w/integration problem
Date: Mon, 2 Jan 2006 00:49:19 -0800
Message-ID: PKEGJHPHLLBACEOICCBJGEOCGBAA.jmiles@pop.net
Never mind, I think I see what's wrong... you can't integrate the dBc/Hz
values directly. You have to turn them back into linear ratios, do the
interval sum, and then, if you want dBc coming out, take 10*log10(sum).
You are almost there... you need to square the linears sum, which
is quickly
done...
sum = 0
sum = sum + pow(10,value[1]/10)
sum = sum + pow(10,value[2]/10)
...
sum = sum + pow(10,value[n]/10)
rms = sqrt(sum)
dBc = 10 * log10(sum)
Normally you would use pow(10,value[1]/20) etc. to get the
amplitudes back, but
RMS is about summing the power and that is the amplitude square
as you recall.
Hmm... I'm less a math-freak this morning than usual. A good morning it is
anyway.
From: "John Miles" jmiles@pop.net
Subject: Re: [time-nuts] Help w/integration problem
Date: Mon, 2 Jan 2006 01:44:33 -0800
Message-ID: PKEGJHPHLLBACEOICCBJEEOEGBAA.jmiles@pop.net
Thanks; yes, I've got the sqrt() part already, from both my original source
who requested the feature, and the Zarlink app note.
I didn't bother to look at the Zarlink app note. Until now.
Naturally, the two sources don't agree. Equation 13 (and others) in the
Maxim app note at http://pdfserv.maxim-ic.com/en/an/AN3359.pdf says, in
effect:
RMS = sqrt(sum * 2)
Yes, the magic happends between (11) and (12). The integration is 0 to infinity
and not -infinity to infinity, since we already know it mirrors arround 0.
Mind you that these are twice the power, not twice the amplitude. The energy at
fc-f will have the same energy and be coherent to the energy at fc+f, so these
energies add up perfectly. There is a special-case when you can't argue like
this, but we can look the other way here and pick out the real reference
literature when we need to.
On page 7 of the Zarlink app note, the x2 factor is left outside the radical
sign:
RMS = sqrt(sum) * 2
Looks like sloppy work to me compared to the Maxim paper, which gives
motivation to the formulas.
Unlike the question of whether to interpolate the column midpoints in dBc
space or linear spectral-density space, the position of that x2 term makes a
big difference in the final result. Any insights into who's got THAT one
right?
I hope you've got some insight on that. I could dig deeper into the issue if
you are not quite satisfied. I have better references than the two PDFs you
mentioned. The whole single-sides/double-side spectra issue is a bit confusing
and painstaking at first, I know.
Cheers,
Magnus
-- john, KE5FX
-----Original Message-----
From: Magnus Danielson [mailto:cfmd@bredband.net]
Sent: Monday, January 02, 2006 1:28 AM
To: time-nuts@febo.com; jmiles@pop.net
Subject: Re: [time-nuts] Help w/integration problem
From: "John Miles" jmiles@pop.net
Subject: Re: [time-nuts] Help w/integration problem
Date: Mon, 2 Jan 2006 00:49:19 -0800
Message-ID: PKEGJHPHLLBACEOICCBJGEOCGBAA.jmiles@pop.net
Never mind, I think I see what's wrong... you can't integrate the dBc/Hz
values directly. You have to turn them back into linear ratios, do the
interval sum, and then, if you want dBc coming out, take 10*log10(sum).
You are almost there... you need to square the linears sum, which
is quickly
done...
sum = 0
sum = sum + pow(10,value[1]/10)
sum = sum + pow(10,value[2]/10)
...
sum = sum + pow(10,value[n]/10)
rms = sqrt(sum)
dBc = 10 * log10(sum)
Normally you would use pow(10,value[1]/20) etc. to get the
amplitudes back, but
RMS is about summing the power and that is the amplitude square
as you recall.
Hmm... I'm less a math-freak this morning than usual. A good morning it is
anyway.
time-nuts mailing list
time-nuts@febo.com
https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
Sorry for top posting, but I'm shifting the original topic, and
apologies for a long semi-off topic post.
I found the original post great and respect both of you guys very much.
Tonight, (perhaps some spirits, in the holiday spirit, are influencing
me, but) I thought about this discussion in a general case.
I learned from smart people and was stimulated to know that I could hang
out with people smarter than me.
I find this conversation a great example of the best use of the
internet. John has done much work in many realms, and has shared a good
amount of his very useful creations and experience with the rest of the
world on the internet.
Magnus, I know less about but he, seems to be one of the people I would
go to for guidance on any number of subjects.
This medium has brought these two, geographically widely separate (I
assume), people together on this conversation that will probably benefit
many with John's software.
I applaud you both for your willingness to share your knowledge and many
of the products of that knowledge.
But tonight, I'm thinking about the state of the world, in general.
This is a private, and limited mailing list, but its members seem to
reflect what I see on public newsgroups. The majority of contributions
seem to be by older people. John is young by most of these standards.
Popular folklore says that the internet is populated with young people.
So my question:
Are the younger people no longer attracted to the basic questions of
science and engineering, or am I just missing the messages from young
people for some reason?
I know this mailing list is not typical, but I don't see younger people
anywhere I go to share knowledge. Wish they were there.
On Mon, 02 Jan 2006 11:42:53 +0100 (CET), Magnus Danielson
cfmd@bredband.net wrote:
From: "John Miles" jmiles@pop.net
Subject: Re: [time-nuts] Help w/integration problem
Date: Mon, 2 Jan 2006 01:44:33 -0800
Message-ID: PKEGJHPHLLBACEOICCBJEEOEGBAA.jmiles@pop.net
Thanks; yes, I've got the sqrt() part already, from both my original source
who requested the feature, and the Zarlink app note.
I didn't bother to look at the Zarlink app note. Until now.
Naturally, the two sources don't agree. Equation 13 (and others) in the
Maxim app note at http://pdfserv.maxim-ic.com/en/an/AN3359.pdf says, in
effect:
RMS = sqrt(sum * 2)
Yes, the magic happends between (11) and (12). The integration is 0 to infinity
and not -infinity to infinity, since we already know it mirrors arround 0.
Mind you that these are twice the power, not twice the amplitude. The energy at
fc-f will have the same energy and be coherent to the energy at fc+f, so these
energies add up perfectly. There is a special-case when you can't argue like
this, but we can look the other way here and pick out the real reference
literature when we need to.
On page 7 of the Zarlink app note, the x2 factor is left outside the radical
sign:
RMS = sqrt(sum) * 2
Looks like sloppy work to me compared to the Maxim paper, which gives
motivation to the formulas.
Unlike the question of whether to interpolate the column midpoints in dBc
space or linear spectral-density space, the position of that x2 term makes a
big difference in the final result. Any insights into who's got THAT one
right?
I hope you've got some insight on that. I could dig deeper into the issue if
you are not quite satisfied. I have better references than the two PDFs you
mentioned. The whole single-sides/double-side spectra issue is a bit confusing
and painstaking at first, I know.
Cheers,
Magnus
-- john, KE5FX
[snip first message]
John -
I wrote a program about 20 years ago to calculate the total integrated noise
power from the individual power spectrum density points. It is in GW Basic
and I still use it almost daily. Let me know if you would like it. 73 - Mike
Mike B. Feher, N4FS
89 Arnold Blvd.
Howell, NJ, 07731
732-886-5960
-----Original Message-----
From: time-nuts-bounces@febo.com [mailto:time-nuts-bounces@febo.com] On
Behalf Of John Miles
Sent: Monday, January 02, 2006 3:00 AM
To: Discussion of precise time and frequency measurement
Subject: [time-nuts] Help w/integration problem
Does anyone have a piece of C (BASIC, whatever) code that turns an array of
dBc/Hz values into integrated RMS noise?
I'm trying to use a simple rectangular integrator to divide a log-log plot
into "bins":
for (i=L_column; i < U_column-1; i++)
{
sum += ((value[i] - ((value[i] - value[i+1]) / 2.0)) *
(frequency[i+1] - frequency[i]));
}
This just takes the midpoint dBc/Hz value between successive columns of a
phase-noise plot, multiplies it by the frequency step between the columns in
question, and sums the result for all columns in the range of interest.
The output of this process, when I feed a typical noise graph with values
around -110 dBc/Hz to it, with frequency values at the lower and upper
limits of 1000 and 10000 Hz, is around -1E+6. What I'd like is a value
corresponding to the "-63 dBc" value cited on pages 7 and 8 in this Zarlink
app note:
http://assets.zarlink.com/CA/Phase_Noise_and_Jitter_Article.pdf
In this note, the author shows a noise curve similar to the ones I'm working
with, and magically pulls -63 dBc out of the ether with no explanation of
the integration process that obtained it. (What does it mean, in the
author's words, to take the area "under" a phase-noise curve, anyway?
What's the bottom dBc/Hz value?)
Being from the instant-gratification generation, I really don't want (and
won't understand) a calculus lecture. I want the 5 lines of code that do
the integration. :-) This is for the next release of my freeware GPIB
noise-measurement app, so your karma will be integrated along with the noise
if you're able to help!
-- john, KE5FX
time-nuts mailing list
time-nuts@febo.com
https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
From: Rex rexa@sonic.net
Subject: Re: [time-nuts] Help - Hope?
Date: Mon, 02 Jan 2006 04:53:29 -0800
Message-ID: ej5ir119a0s0j98aadricj2ds92s45hlts@4ax.com
Rex,
Thanks for the kind words.
But tonight, I'm thinking about the state of the world, in general.
This is a private, and limited mailing list, but its members seem to
reflect what I see on public newsgroups. The majority of contributions
seem to be by older people. John is young by most of these standards.
Popular folklore says that the internet is populated with young people.
So my question:
Are the younger people no longer attracted to the basic questions of
science and engineering, or am I just missing the messages from young
people for some reason?
Define younger. Do they need to be 18-20 years or do olders farts like me (i'm
34) count in as younger?
But to answer your question, younger people is still attracted and there is
still plenty of people having the right mind for these things around. They are
just dispersed alot more than they used to. There is still people that WANT
to pick up the knowledge of how to use the soldering iron, eager to learn the
magics of electronics and other sciences. They may seek this in other forums
than we oldies (well, relative oldies then) did, but in the end, they usually
get around to it. I'm not all that worried, rather the opposite, they are
starting to react. Whenever I bump into someone, I toss them in the general
right direction, trying to help them not only learning the skills, but also
learning the places where to suck up knowledge and make it a regular habbit.
It takes some time, but all of a sudden they bloome and it is a joy to see.
If you have something sensible to say, there are people there to listen.
I know this mailing list is not typical, but I don't see younger people
anywhere I go to share knowledge. Wish they were there.
The archives are public. This is how it is done today, kiddies search through
Google. Add some knowledge on Wikipedia and you have set the trap for them to
step into.
Cheers,
Magnus