Skip to content

No calculations are done if the Maximum frequency (Hz) is left at the default value of 0 (Need to suggest a better default value) #2

Open
@kirxkirx

Description

@kirxkirx

Thanks for the nice code!

One small problem I've encountered: when I left the Maximum frequency (Hz) to the default value of 0 no computation has been done. The reason is kind of obvious, but at the same time it's confusing as when one runs the new code, the intuitions suggest to try it with the default values first. Maybe you can change the default value of Maximum frequency (Hz) to something like 1 or 0.1?
Here is how the interaction with the program looked like:

$ z2n

        Z2n Software (2.0.6), a python package for periodograms analysis.
        Copyright (C) 2020, and MIT License, by Yohan Alexander [UFS].
        Type "help" for more information or "docs" for documentation.
        
The event file is needed.

Filename [nu80601317002A01_cl_bary_sr.evt]: nu80601317002A01_cl_bary_sr.evt
Multiple columns TIME found.
Number Extension Length (Rows)
------ --------- -------------
     1    EVENTS           579
     4    BADPIX            87
     5    BADPIX           106
     6    BADPIX           108
     7    BADPIX           226
Which extension number? 1
Use column in EVENTS [y/N]: y
Event file loaded.
579 events.
Exposure time (Texp): 124762.6 s
Sampling rate (1/Texp): 8.0e-06 Hz
Nyquist 2*(1/Texp): 1.6e-05 Hz
The frequency range is needed (Hz).

Nyquist as the minimum frequency [Y/n]? y

Maximum frequency (Hz) [0.001]: 0

Use oversampling factor [Y/n]? y

Oversampling factor [10]: 10

Minimum frequency: 1.6e-05 Hz
Maximum frequency: 0.0e+00 Hz
Frequency steps: 8.0e-07 Hz


Number of harmonics [1]: Computation memory -0.00160 MB

Run with these values [Y/n]? y
0 steps.
Calculating the periodogram: 0it [00:00, ?it/s]
/home/kirx/.local/lib64/python3.6/site-packages/numba/np/ufunc/parallel.py:363: NumbaWarning: The TBB threading layer requires TBB version 2019.5 or later i.e., TBB_INTERFACE_VERSION >= 11005. Found TBB_INTERFACE_VERSION = 9103. The TBB threading layer is disabled.
  warnings.warn(problem)
Periodogram calculated.
Select the peak region to estimate uncertainty.
Is the peak region selected [y/N]? 

I know I shouldn't combine multiple things in one Issue, but this one is so small that I'll do it anyway:
I suggest to put a hyperlink to the Buccheri et al. (1983) paper in README.md The link is https://ui.adsabs.harvard.edu/abs/1983A%26A...128..245B/abstract

Activity

kirxkirx

kirxkirx commented on Feb 27, 2021

@kirxkirx
Author

On a different note, you may be curious to see the comparison of z2n with the implementation in my code and the "standard" tool XRONOS/powspec. The slight difference with XRONOS/powspec is because it computes a different thing: rather than follow the Discrete Fourier Transform definition directly (Deeming, 1975) as patpc and z2n-periodogram do, powspec produces a binned ``lightcurve'' with a regular sampling where most of the measurements are 0 (no photons arrived), some measurements are equal to 1 (one photon arrived) and maybe some bins have more than one photon. Then powspec runs an FFT on this lightcurve. Overall, this procedure is similar, but not the same as computing the Discrete Fourier Transform over the list of photon arrival times.
So in summary, our codes produce similar results and arguably they are doing the right thing! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

      Participants

      @kirxkirx

      Issue actions

        No calculations are done if the Maximum frequency (Hz) is left at the default value of 0 (Need to suggest a better default value) · Issue #2 · YohanAlexander/z2n-periodogram