/sdf/group/fermi/u/kocevski/software/conda/envs/fermitools_v1.0.5/lib/python2.7/site-packages/pyfits/__init__.py:22: PyFITSDeprecationWarning: PyFITS is deprecated, please use astropy.io.fits
  PyFITSDeprecationWarning)  # noqa

Likelihood Analysis Tool
Support Contact: Daniel Kocevski (daniel.kocevski@nasa.gov)

Importing modules...
This is make3FGLxml version 01r0.
The default diffuse model files and names are for pass 8 and assume you have v10r00p05 of the Fermi Science Tools or higher.
This is make4FGLDR3xml version 01r09.
The default diffuse model files and names are for P8R3, 4FGL DRs, and the default fermitools directory locations.

WARNING: version mismatch between CFITSIO header (v3.43) and linked library (v3.41).

/sdf/group/fermi/u/kocevski/software/conda/envs/fermitools_v1.0.5/lib/python2.7/site-packages/matplotlib/cbook/deprecation.py:106: MatplotlibDeprecationWarning: The mpl_toolkits.axes_grid module was deprecated in version 2.1. Use mpl_toolkits.axes_grid1 and mpl_toolkits.axisartist provies the same functionality instead.
  warnings.warn(message, mplDeprecation, stacklevel=1)

WARNING: version mismatch between CFITSIO header (v3.43) and linked library (v3.41).

number of points = 14872
number of fields = 31
RA_SUN column already exists. File will not be modified.
Done.


Performing analysis on: 4FGL_J0005.9+3824_weekly_bin854
RA = 1.4986, Dec = 38.401
tmin = 755481601, tmax = 756086401
emin = 100.0, emax = 100000.0
irfs = P8R3_SOURCE_V2
ROI = 12
zmax = 90

Fitting strategies:
Fix sources to their catalog values = True
Leave variable source normalizations free = True
Perform pre-fit where ALL sources are frozen to catalog values = False
Perform secondary fit with a free spectral index = True
Remove all catalog sources = False
Remove weak (TS < 2) catalog sources = False
Freeze Galactic component = False

Likelihood fit parameters:
Statistic: UNBINNED
Optimizer: MINUIT

Catalog: 4FGL

Repository job = True

LAT data source:
Data catalog

Updating database...

UPDATE lightcurve_data_v2 SET job_id='60350544', job_status='RUN', time_executed='2024-12-17 00:01:57.221656', time_epoch_executed='1734422517.22' WHERE source_name='4FGL J0005.9+3824' and cadence='weekly' and bin_id='854'

Database successfully updated.
Done.

Creating custom output directory:
/lscratch/kocevski/60350544

Creating custom pfile directory:
/lscratch/kocevski/60350544/pfiles/

Retrieving the FT1 file...

Issuing command:
datacat find --group FT1 --filter 'nMetStop>=755481601.0 && nMetStart<756086401.0' /Data/Flight/Reprocess/P305

Issuing command:
datacat find --group FT1 --filter 'nMetStart>564945418 && nMetStop>=755481601.0 && nMetStart<756086401.0' /Data/Flight/Level1/LPA

Retrieving 92 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/lscratch/kocevski/60350544/ft1_4FGL_J0005.9+3824_weekly_bin854.fits


Retrieving the FT1 file...

Issuing command:
datacat find --group FT2 --filter 'nMetStop>=755481601.0 && nMetStart<756086401.0' /Data/Flight/Level1/LPA

Retrieving 92 files...
Done.


Merging files...

Merged file saved to:
/lscratch/kocevski/60350544/ft2_4FGL_J0005.9+3824_weekly_bin854.fits


Selecting the photons:
time -p gtselect infile=/lscratch/kocevski/60350544/ft1_4FGL_J0005.9+3824_weekly_bin854.fits outfile=/lscratch/kocevski/60350544/ft1_filteredMKT_4FGL_J0005.9+3824_weekly_bin854.fits ra=1.4986 dec=38.401 rad=12.0 tmin=755481601.0 tmax=756086401.0 emin=100.0 emax=100000.0 zmin=0.0 zmax=90.0 evclass=128 evtype="INDEF" convtype=-1 phasemin=0.0 phasemax=1.0 evtable="EVENTS" chatter=2 clobber=yes debug=no gui=no mode="ql"

WARNING: version mismatch between CFITSIO header (v3.43) and linked library (v3.41).

Done.
real 4.30
user 3.79
sys 0.26

Adding sun position to ft2 file:
/sdf/group/fermi/g/LCRepository/Repository/bin/sunpos /lscratch/kocevski/60350544/ft2_4FGL_J0005.9+3824_weekly_bin854.fits

Selecting the good time intervals:
time -p gtmktime scfile=/lscratch/kocevski/60350544/ft2_4FGL_J0005.9+3824_weekly_bin854.fits sctable="SC_DATA" filter="IN_SAA!=T && LIVETIME>0 && gtifilter('/sdf/group/fermi/g/LCRepository/Likelihood/GTIs/nogrb.gti',(START+STOP)/2) && (angsep(RA_SUN,DEC_SUN,RA_ZENITH,DEC_ZENITH)>115 || gtifilter('/sdf/group/fermi/g/LCRepository/Likelihood/GTIs/nosolarflares.gti',(START+STOP)/2))" roicut=no evfile=/lscratch/kocevski/60350544/ft1_filteredMKT_4FGL_J0005.9+3824_weekly_bin854.fits evtable="EVENTS" outfile="/lscratch/kocevski/60350544/ft1_filtered_4FGL_J0005.9+3824_weekly_bin854.fits" apply_filter=yes overwrite=yes header_obstimes=yes tstart=0.0 tstop=0.0 gtifile="default" chatter=3 clobber=yes debug=no gui=no mode="ql"

WARNING: version mismatch between CFITSIO header (v3.43) and linked library (v3.41).

This is gtmktime version HEAD
Applying GTI filter:
IN_SAA!=T && LIVETIME>0 && gtifilter('/sdf/group/fermi/g/LCRepository/Likelihood/GTIs/nogrb.gti',(START+STOP)/2) && (angsep(RA_SUN,DEC_SUN,RA_ZENITH,DEC_ZENITH)>115 || gtifilter('/sdf/group/fermi/g/LCRepository/Likelihood/GTIs/nosolarflares.gti',(START+STOP)/2))
real 0.45
user 0.17
sys 0.15

Number of photons that the gtmktime cut: 1665

Generating the livetime cube:
time -p gtltcube evfile="/lscratch/kocevski/60350544/ft1_filtered_4FGL_J0005.9+3824_weekly_bin854.fits" evtable="EVENTS" scfile=/lscratch/kocevski/60350544/ft2_4FGL_J0005.9+3824_weekly_bin854.fits sctable="SC_DATA" outfile=/lscratch/kocevski/60350544/ltcube_755481601_756086401_4FGL_J0005.9+3824_weekly_bin854.fits dcostheta=0.025 binsz=1.0 phibins=0 tmin=0.0 tmax=0.0 file_version="1" zmin=0.0 zmax=90.0 chatter=2 clobber=yes debug=no gui=no mode="ql"

WARNING: version mismatch between CFITSIO header (v3.43) and linked library (v3.41).

Working on file /lscratch/kocevski/60350544/ft2_4FGL_J0005.9+3824_weekly_bin854.fits
.....................!
real 26.80
user 25.98
sys 0.33

Generating the exposure map:
time -p gtexpmap evfile=/lscratch/kocevski/60350544/ft1_filtered_4FGL_J0005.9+3824_weekly_bin854.fits evtable="EVENTS" scfile=/lscratch/kocevski/60350544/ft2_4FGL_J0005.9+3824_weekly_bin854.fits sctable="SC_DATA" expcube=/lscratch/kocevski/60350544/ltcube_755481601_756086401_4FGL_J0005.9+3824_weekly_bin854.fits outfile=/lscratch/kocevski/60350544/expmap_755481601_756086401_4FGL_J0005.9+3824_weekly_bin854.fits irfs="P8R3_SOURCE_V2" evtype="INDEF" srcrad=30.0 nlong=88 nlat=88 nenergies=10 submap=no nlongmin=0 nlongmax=0 nlatmin=0 nlatmax=0 chatter=2 clobber=yes debug=no gui=no mode="ql"

WARNING: version mismatch between CFITSIO header (v3.43) and linked library (v3.41).

The exposure maps generated by this tool are meant
to be used for *unbinned* likelihood analysis only.
Do not use them for binned analyses.
Computing the ExposureMap using /lscratch/kocevski/60350544/ltcube_755481601_756086401_4FGL_J0005.9+3824_weekly_bin854.fits
.....................!
real 59.48
user 55.68
sys 3.36

Generating the xml model:
radLim = 0.001
maxRad = 12
normsOnly = True
freeVariableSources = True
Fixing all sources to their catalog values, except variable sources
Creating file and adding sources from 4FGL
Extended source FHES J2304.0+5406 in ROI with RadialGaussian spatial model.
Added 158 point sources and 1 extended sources
If using unbinned likelihood you will need to rerun gtdiffrsp for the extended sources or rerun the makeModel function with optional argument psForce=True

Setting source of interest to:
4FGL J0005.9+3824 @ 1.4986 38.401

Creating the counts map:
time -p gtbin evfile=/lscratch/kocevski/60350544/ft1_filtered_4FGL_J0005.9+3824_weekly_bin854.fits scfile=/lscratch/kocevski/60350544/ft2_4FGL_J0005.9+3824_weekly_bin854.fits outfile=/lscratch/kocevski/60350544/cmap_755481601_756086401_4FGL_J0005.9+3824_weekly_bin854.fits algorithm="CMAP" ebinalg="LOG" emin=30.0 emax=200000.0 ebinfile=NONE tbinalg="LIN" tbinfile=NONE nxpix=160 nypix=160 binsz=0.25 coordsys="CEL" xref=1.4986 yref=38.401 axisrot=0.0 rafield="RA" decfield="DEC" proj="AIT" hpx_ordering_scheme="RING" hpx_order=3 hpx_ebin=yes hpx_region="" evtable="EVENTS" sctable="SC_DATA" efield="ENERGY" tfield="TIME" chatter=2 clobber=yes debug=no gui=no mode="ql"

WARNING: version mismatch between CFITSIO header (v3.43) and linked library (v3.41).

This is gtbin version HEAD
real 0.65
user 0.20
sys 0.14

Creating the high resolution counts map:
time -p gtbin evfile=/lscratch/kocevski/60350544/ft1_filtered_4FGL_J0005.9+3824_weekly_bin854.fits scfile=/lscratch/kocevski/60350544/ft2_4FGL_J0005.9+3824_weekly_bin854.fits outfile=/lscratch/kocevski/60350544/cmap_HighResolution_755481601_756086401_4FGL_J0005.9+3824_weekly_bin854.fits algorithm="CMAP" ebinalg="LOG" emin=30.0 emax=200000.0 ebinfile=NONE tbinalg="LIN" tbinfile=NONE nxpix=500 nypix=500 binsz=0.1 coordsys="CEL" xref=1.4986 yref=38.401 axisrot=0.0 rafield="RA" decfield="DEC" proj="AIT" hpx_ordering_scheme="RING" hpx_order=3 hpx_ebin=yes hpx_region="" evtable="EVENTS" sctable="SC_DATA" efield="ENERGY" tfield="TIME" chatter=2 clobber=yes debug=no gui=no mode="ql"

WARNING: version mismatch between CFITSIO header (v3.43) and linked library (v3.41).

This is gtbin version HEAD
real 0.59
user 0.19
sys 0.14

Computing the diffuse response:
time -p gtdiffrsp evfile=/lscratch/kocevski/60350544/ft1_filtered_4FGL_J0005.9+3824_weekly_bin854.fits evtable="EVENTS" scfile=/lscratch/kocevski/60350544/ft2_4FGL_J0005.9+3824_weekly_bin854.fits sctable="SC_DATA" srcmdl=/lscratch/kocevski/60350544/Model_4FGL_J0005.9+3824_weekly_bin854.xml irfs="P8R3_SOURCE_V2" evclsmin=0 evclass="INDEF" evtype="INDEF" convert=yes chatter=2 clobber=yes debug=no gui=no mode="ql"

WARNING: version mismatch between CFITSIO header (v3.43) and linked library (v3.41).

adding source EG_v02
adding source FHES J2304.0+5406
adding source GAL_V02
Working on...
/lscratch/kocevski/60350544/ft1_filtered_4FGL_J0005.9+3824_weekly_bin854.fits.....................!
real 57.84
user 56.36
sys 0.92

Creating the likelihood object...
obs = UnbinnedObs('/lscratch/kocevski/60350544/ft1_filtered_4FGL_J0005.9+3824_weekly_bin854.fits', '/lscratch/kocevski/60350544/ft2_4FGL_J0005.9+3824_weekly_bin854.fits', expMap='/lscratch/kocevski/60350544/expmap_755481601_756086401_4FGL_J0005.9+3824_weekly_bin854.fits', expCube='/lscratch/kocevski/60350544/ltcube_755481601_756086401_4FGL_J0005.9+3824_weekly_bin854.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/lscratch/kocevski/60350544/Model_4FGL_J0005.9+3824_weekly_bin854.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J0005.9+3824'

4FGL J0005.9+3824
   Spectrum: LogParabola
23          norm:  7.465e+00  0.000e+00  0.000e+00  1.000e+06 ( 1.000e-12)
24         alpha:  2.552e+00  0.000e+00  0.000e+00  5.000e+00 ( 1.000e+00) fixed
25          beta:  1.899e-01  0.000e+00 -5.000e+00  1.000e+01 ( 1.000e+00) fixed
26            Eb:  4.501e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /lscratch/kocevski/60350544/ft1_filtered_4FGL_J0005.9+3824_weekly_bin854.fits
Spacecraft file(s): /lscratch/kocevski/60350544/ft2_4FGL_J0005.9+3824_weekly_bin854.fits
Exposure map: /lscratch/kocevski/60350544/expmap_755481601_756086401_4FGL_J0005.9+3824_weekly_bin854.fits
Exposure cube: /lscratch/kocevski/60350544/ltcube_755481601_756086401_4FGL_J0005.9+3824_weekly_bin854.fits
IRFs: P8R3_SOURCE_V2
Source model file: /lscratch/kocevski/60350544/Model_4FGL_J0005.9+3824_weekly_bin854.xml
Optimizer: MINUIT
Statistic: UNBINNED

Performing an iterative likelihood fit...

Fit tolerance = 1

Performing likelihood fit...
Done.

MINUIT Return Code (Fixed Index): 0
logL (Fixed Index) = 17653.3569369

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Fixed Index): 0
logL (Fixed Index) = 17653.3140227

Fit tolerance = 1e-08

Performing likelihood fit...
 **********
 **   14 **SET NOWARN 
 **********

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .52377E-04   1.0000          .0000       .10000E+07
     2 'norm      '    8.7641       1.0000          .0000       .10000E+07
     3 'Prefactor '    3.2962       1.0000          .0000       .10000E+07
     4 'Prefactor '    .17676E-04   1.0000          .0000       .10000E+07
     5 'Prefactor '    1.0480       1.0000          .0000       .10000E+07
     6 'Prefactor '    19.878       1.0000          .0000       .10000E+07
     7 'Prefactor '    .32360E-04   1.0000          .0000       .10000E+07
     8 'Prefactor '    4.5001       1.0000          .0000       .10000E+07
     9 'norm      '    3.5098       1.0000          .0000       .10000E+07
    10 'Prefactor '    .31697E-07   1.0000          .0000       .10000E+07
    11 'Prefactor '    .39597E-03   1.0000          .0000       .10000E+07
    12 'Prefactor '    .41710E-03   1.0000          .0000       .10000E+07
    13 'Prefactor '    23.825       1.0000          .0000       .10000E+07
    14 'norm      '    .59341E-07   1.0000          .0000       .10000E+07
    15 'Prefactor '    .49747E-04   1.0000          .0000       .10000E+07
    16 'norm      '    .10932E-03   1.0000          .0000       .10000E+07
    17 'norm      '    .54296E-03   1.0000          .0000       .10000E+07
    18 'Prefactor '    15.005       1.0000          .0000       .10000E+07
    19 'norm      '    2.2601       1.0000          .0000       .10000E+07
    20 'Prefactor '    .27780E-04   1.0000          .0000       .10000E+07
    21 'Prefactor '    .16038E-04   1.0000          .0000       .10000E+07
    22 'Prefactor '    19.750       1.0000          .0000       .10000E+07
    23 'Prefactor '    2.0417       1.0000          .0000       .10000E+07
    24 'Normalizat'    .95697       1.0000         .10000E-01   10.000    
    25 'Prefactor '    .92538       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5200E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   17653.31     FROM MIGRAD    STATUS=CONVERGED    120 CALLS     2080 TOTAL
                     EDM=   .60E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  5.6%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .59286E-07    2.7803        .19469E-06** at limit **
   2  norm          8.7693        1.2599        .91808E-07    .30776E-02
   3  Prefactor     3.2842        3.1912       -.25451E-06    .10887E-02
   4  Prefactor     .51015E-07    3.7518       -.16591E-05** at limit **
   5  Prefactor     1.0444        1.5703        .10439E-06   -.50357E-03
   6  Prefactor     19.884        1.1313       -.18752E-08    .29011E-02
   7  Prefactor     .26534E-07    11.164       -.35777E-07** at limit **
   8  Prefactor     4.8286        7.5593        .19563E-05   -.40490E-01
   9  norm          3.5098        1.3875        .20845E-08    .12151E-02
  10  Prefactor      .0000        1.7015       -.47525E-07** at limit **
  11  Prefactor     .10963E-06    3.1071        .70735E-06** at limit **
  12  Prefactor     .16653E-09    2.7452        .26844E-07** at limit **
  13  Prefactor     23.816        1.0686       -.23610E-07   -.25781E-02
  14  norm           .0000        .50845        .58026E-07** at limit **
  15  Prefactor     .30698E-07    1.9020       -.22440E-06** at limit **
  16  norm           .0000        2.4595       -.36073E-06** at limit **
  17  norm          .66058E-08    4.7809        .20316E-05** at limit **
  18  Prefactor     15.030        2.0516       -.42424E-08    .36423E-02
  19  norm          2.2605        1.4695       -.78083E-07    .11004E-02
  20  Prefactor     .53402E-07    3.4693       -.26778E-06** at limit **
  21  Prefactor     .26756E-07    3.1202       -.14671E-05** at limit **
  22  Prefactor     19.789        1.9833        .23635E-06   -.36856E-01
  23  Prefactor     2.0434        4.4295        .15635E-06    .17275E-03
  24  Normalizat    .95686        .13816       -.13930E-04   -.95914E-04
  25  Prefactor     .92534        .69695E-01    .31309E-05   -.87058E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 5.92859e-08
  norm       = 8.76935
  Prefactor  = 3.2842
  Prefactor  = 5.10147e-08
  Prefactor  = 1.04439
  Prefactor  = 19.8836
  Prefactor  = 2.65343e-08
  Prefactor  = 4.82863
  norm       = 3.50985
  Prefactor  = 0
  Prefactor  = 1.09635e-07
  Prefactor  = 1.66533e-10
  Prefactor  = 23.8159
  norm       = 0
  Prefactor  = 3.06977e-08
  norm       = 0
  norm       = 6.60583e-09
  Prefactor  = 15.0296
  norm       = 2.26055
  Prefactor  = 5.34017e-08
  Prefactor  = 2.67564e-08
  Prefactor  = 19.7887
  Prefactor  = 2.04345
  Normalizat = 0.956856
  Prefactor  = 0.925339
 **********
 **   18 **HESSE 
 **********

 FCN=   17653.31     FROM HESSE     STATUS=OK           475 CALLS     2555 TOTAL
                     EDM=   .38E-06    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .59286E-07    7.3305        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  norm          8.7693        10.276        .33834E-03   -1.5649    
   3  Prefactor     3.2842        3.2528        .55740E-03   -1.5672    
   4  Prefactor     .51015E-07    4.2041        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     1.0444        1.6967        .12120E-02   -1.5688    
   6  Prefactor     19.884        12.113        .22437E-03   -1.5619    
   7  Prefactor     .26534E-07    11.482        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     4.8286        21.445        .47438E-03   -1.5664    
   9  norm          3.5098        1.3870        .53940E-03   -1.5670    
  10  Prefactor      .0000        1.6958        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     .10963E-06    4.4299        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     .16653E-09    2.7400        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor     23.816        12.706        .20492E-03   -1.5610    
  14  norm           .0000        .50147        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor     .30698E-07    7.3835        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  norm           .0000        2.4571        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          .66058E-08    8.9864        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor     15.030        10.798        .25831E-03   -1.5630    
  19  norm          2.2605        1.4723        .68303E-03   -1.5678    
  20  Prefactor     .53402E-07    5.3982        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  Prefactor     .26756E-07    6.3280        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  Prefactor     19.789        44.792        .22509E-03   -1.5619    
  23  Prefactor     2.0434        6.4736        .72340E-03   -1.5679    
  24  Normalizat    .95686        .12188        .71982E-01   -.94490    
  25  Prefactor     .92534        .59987E-01    .45328E-01   -.95261    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.79215e-07
Minuit parameter uncertainties:
  1  0.00131819
  2  10.2763
  3  3.25276
  4  0.000926308
  5  1.69667
  6  12.1127
  7  0.00110436
  8  20.3521
  9  1.38702
  10  2.68426e-06
  11  0.00139364
  12  4.08576e-05
  13  12.7057
  14  1.40011e-06
  15  0.000952073
  16  7.43914e-06
  17  0.000486315
  18  10.7978
  19  1.47231
  20  0.00107397
  21  0.00082305
  22  44.7924
  23  6.47362
  24  0.121912
  25  0.0599918
Done.

MINUIT Return Code (Fixed Index): 0
logL (Fixed Index) = 17653.3136873

Extracting fit parameters...

4FGL J0005.9+3824
   Spectrum: LogParabola
23          norm:  8.769e+00  1.028e+01  0.000e+00  1.000e+06 ( 1.000e-12)
24         alpha:  2.552e+00  0.000e+00  0.000e+00  5.000e+00 ( 1.000e+00) fixed
25          beta:  1.899e-01  0.000e+00 -5.000e+00  1.000e+01 ( 1.000e+00) fixed
26            Eb:  4.501e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
517    Prefactor:  9.253e-01  5.999e-02  0.000e+00  1.000e+01 ( 1.000e+00)
518        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
519        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
512   Normalization:  9.569e-01  1.219e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 1.11
Ra Dec: 1.499 38.401
Photon Index (Fixed Index): 2.55 +/- 0.00
Photon Flux (Fixed Index): 2.13e-08 +/- 2.50e-08
Energy Flux (Fixed Index): 5.53e-06 +/- 6.48e-06

TS (Fixed Index): 1.11
Ra Dec: 1.499 38.401
Photon Flux Upper Limit: 7.10599158941e-08 ph cm-2 s-1
Energy Flux Upper Limit: 1.84082598746e-05 MeV cm-2 s-1

Saving results to:
/lscratch/kocevski/60350544/likelihoodResults_755481601_756086401_4FGL_J0005.9+3824_weekly_bin854.txt

Performing a free index iterative likelihood fit...

Freezing all point sources, except source of interest...

Done.

Freeing candidate source...
Done.

Fit tolerance = 1

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 17653.2962544
delta logL = 0.0174329443144

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 17653.2907417
delta logL = 0.0229455831213

Fit tolerance = 1e-08

Performing likelihood fit...
 **********
 **   14 **SET NOWARN 
 **********

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    7.7389       1.0000          .0000       .10000E+07
     2 'alpha     '    2.8954       1.0000          .0000       5.0000    
     3 'Normalizat'    .95015       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .92769       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5200E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.
 MACHINE ACCURACY LIMITS FURTHER IMPROVEMENT.

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.
 MIGRAD TERMINATED WITHOUT CONVERGENCE.

 FCN=   17653.29     FROM MIGRAD    STATUS=FAILED       100 CALLS      257 TOTAL
                     EDM=   .13E-06    STRATEGY= 1      ERR MATRIX APPROXIMATE

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          7.7346        13.832        .72045E-04   -.41596E-03
   2  alpha         2.8970        1.8891        .52601E-01    .41486E-03
   3  Normalizat    .95013        .14317        .31950E-03   -.26047E-04
   4  Prefactor     .92768        .71016E-01    .16288E-03   -.27026E-04
                               ERR DEF=  .500    
 START SIMPLEX MINIMIZATION.    CONVERGENCE WHEN EDM .LT.   .20E-04
 SIMPLEX MINIMIZATION HAS CONVERGED.

 FCN=   17653.29     FROM SIMPLEX   STATUS=UNCHANGED     69 CALLS      326 TOTAL
                     EDM=   .19E-04    STRATEGY= 1      ERR MATRIX APPROXIMATE

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          7.7346        13.832        .24628E-04   -1.5652    
   2  alpha         2.8970        1.8891        .36356E-02    .15947    
   3  Normalizat    .95013        .14317        .25781E-03   -.94720    
   4  Prefactor     .92768        .71016E-01    .12563E-03   -.95181    
                               ERR DEF=  .500    

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   17653.29     FROM MIGRAD    STATUS=CONVERGED     35 CALLS      361 TOTAL
                     EDM=   .32E-11    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          7.7346        10.999        .28818E-05   -.25248E-03
   2  alpha         2.8970        1.5756        .10520E-01    .13789E-05
   3  Normalizat    .95013        .14192        .12780E-04   -.28467E-05
   4  Prefactor     .92768        .70499E-01    .32576E-04   -.39087E-05
                               ERR DEF=  .500    
Final values: 
  norm       = 7.73461
  alpha      = 2.89699
  Normalizat = 0.950133
  Prefactor  = 0.927677
 **********
 **   18 **HESSE 
 **********

 FCN=   17653.29     FROM HESSE     STATUS=OK            25 CALLS      386 TOTAL
                     EDM=   .19E-11    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          7.7346        10.662        .57636E-06   -1.5652    
   2  alpha         2.8970        1.5337        .42081E-03    .15947    
   3  Normalizat    .95013        .14168        .25560E-05   -.94720    
   4  Prefactor     .92768        .70403E-01    .65152E-05   -.95181    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.85295e-12
Minuit parameter uncertainties:
  1  10.6625
  2  1.65499
  3  0.141734
  4  0.0704099
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 17653.2907411
delta logL = 0.0229461934796

Extracting fit parameters...

4FGL J0005.9+3824
   Spectrum: LogParabola
23          norm:  7.735e+00  1.066e+01  0.000e+00  1.000e+06 ( 1.000e-12)
24         alpha:  2.897e+00  1.655e+00  0.000e+00  5.000e+00 ( 1.000e+00)
25          beta:  1.899e-01  0.000e+00 -5.000e+00  1.000e+01 ( 1.000e+00) fixed
26            Eb:  4.501e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
517    Prefactor:  9.277e-01  7.041e-02  0.000e+00  1.000e+01 ( 1.000e+00)
518        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
519        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
512   Normalization:  9.501e-01  1.417e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 1.16
Ra Dec: 1.499 38.401
Photon Index (Free Index): 2.90 +/- 1.65
Photon Flux (Free Index): 2.54e-08 +/- 3.17e-08
Energy Flux (Free Index): 5.49e-06 +/- 5.84e-06

Creating a high resolution counts map...
INFO: Auto-setting vmin to -1.000e-01 [aplpy.core]
INFO: Auto-setting vmax to  1.110e+00 [aplpy.core]
Saving /lscratch/kocevski/60350544/cmap_HighResolution_755481601_756086401_4FGL_J0005.9+3824_weekly_bin854.png

Cleaning up...

** Nuclear option initiated! **

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='1.84e-05', comment='SUCCESS', photon_flux='2.13e-08', energy_flux2='5.49e-06', photon_flux_error='2.50e-08', dlogl='2.29e-02', energy_flux='5.53e-06', photon_flux2='2.54e-08', job_status='DONE', time_completed='2024-12-17 00:10:39.440610', photon_index_error2='1.65', photon_index2='2.90', ts='1.11', fit_tolerance='1e-08', GAL='0.93', photon_index_error='0.00', photon_flux_upper_limit='7.11e-08', energy_flux_error2='5.84e-06', EG='0.96', time_epoch_completed='1734423039.44', return_code='0', job_id='60350544', GAL2='0.93', EG2='0.95', return_code2='0', energy_flux_error='6.48e-06', photon_flux_error2='3.17e-08', ts2='1.16', photon_index='2.55' WHERE bin_id='854' AND source_name='4FGL J0005.9+3824' AND cadence='weekly';

Database successfully updated.


Analysis Complete.


Tue Dec 17 00:10:39 PST 2024

