 **********
 **   18 **HESSE 
 **********

 FCN=   9983.768     FROM HESSE     STATUS=OK           410 CALLS     2232 TOTAL
                     EDM=   .39E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     30.367        18.585        .18162E-03   -1.5598    
   2  norm          .52569E-07    21.049        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     .16653E-08    6.8574        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .26978E-07    10.224        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor      .0000        1.5223        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .38858E-09    5.9127        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     22.786        22.924        .21152E-03   -1.5612    
   8  Prefactor     .38802E-07    9.2683        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  norm          .95224        1.6457        .42351E-03   -1.5688    
  10  Prefactor      .0000        1.3176        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     .55844E-07    21.433        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  norm          1.1014        1.0208        .19883E-02   -1.5687    
  13  Prefactor     10.774        8.8613        .30607E-03   -1.5642    
  14  norm           .0000        1.4475        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  norm          .11585E-06    12.087        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor     18.458        15.477        .23272E-03   -1.5622    
  17  norm           .0000        .76376        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor      .0000        17.082        .16930E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Prefactor     .41023E-07    8.5388        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     .18763E-07    17.523        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  Prefactor     .25441E-06    23.304        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  Normalizat    1.1054        .17097        .71751E-01   -.89578    
  23  Prefactor     .89846        .78519E-01    .44987E-01   -.96195    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.85047e-08
Minuit parameter uncertainties:
  1  18.5849
  2  0.00210352
  3  0.000212018
  4  0.00105063
  5  1.16316e-06
  6  9.30168e-05
  7  22.9242
  8  0.00119908
  9  1.64567
  10  2.44284e-06
  11  0.0021883
  12  1.02083
  13  8.86133
  14  4.45409e-06
  15  0.0023664
  16  15.4773
  17  3.96882e-06
  18  1.17879e-05
  19  0.0011835
  20  0.0011463
  21  0.00487006
  22  0.171052
  23  0.0785289
/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
tfile=/lscratch/kocevski/19664185/ltcube_711072001_711331201_4FGL_J2358.3+3830_daily_bin1820.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/19664185/ft2_4FGL_J2358.3+3830_daily_bin1820.fits
.....................!
real 8.18
user 6.97
sys 0.26

Generating the exposure map:
time -p gtexpmap evfile=/lscratch/kocevski/19664185/ft1_filtered_4FGL_J2358.3+3830_daily_bin1820.fits evtable="EVENTS" scfile=/lscratch/kocevski/19664185/ft2_4FGL_J2358.3+3830_daily_bin1820.fits sctable="SC_DATA" expcube=/lscratch/kocevski/19664185/ltcube_711072001_711331201_4FGL_J2358.3+3830_daily_bin1820.fits outfile=/lscratch/kocevski/19664185/expmap_711072001_711331201_4FGL_J2358.3+3830_daily_bin1820.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/19664185/ltcube_711072001_711331201_4FGL_J2358.3+3830_daily_bin1820.fits
.....................!
real 63.44
user 58.59
sys 3.73

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 154 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 J2358.3+3830 @ 359.588 38.5097

Creating the counts map:
time -p gtbin evfile=/lscratch/kocevski/19664185/ft1_filtered_4FGL_J2358.3+3830_daily_bin1820.fits scfile=/lscratch/kocevski/19664185/ft2_4FGL_J2358.3+3830_daily_bin1820.fits outfile=/lscratch/kocevski/19664185/cmap_711072001_711331201_4FGL_J2358.3+3830_daily_bin1820.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=359.588 yref=38.5097 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 1.11
user 0.20
sys 0.13

Creating the high resolution counts map:
time -p gtbin evfile=/lscratch/kocevski/19664185/ft1_filtered_4FGL_J2358.3+3830_daily_bin1820.fits scfile=/lscratch/kocevski/19664185/ft2_4FGL_J2358.3+3830_daily_bin1820.fits outfile=/lscratch/kocevski/19664185/cmap_HighResolution_711072001_711331201_4FGL_J2358.3+3830_daily_bin1820.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=359.588 yref=38.5097 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 1.08
user 0.20
sys 0.14

Computing the diffuse response:
time -p gtdiffrsp evfile=/lscratch/kocevski/19664185/ft1_filtered_4FGL_J2358.3+3830_daily_bin1820.fits evtable="EVENTS" scfile=/lscratch/kocevski/19664185/ft2_4FGL_J2358.3+3830_daily_bin1820.fits sctable="SC_DATA" srcmdl=/lscratch/kocevski/19664185/Model_4FGL_J2358.3+3830_daily_bin1820.xml irfs="P8R3_SOURCE_
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).

Done.

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

Extracting fit parameters...

4FGL J2358.3+3830
   Spectrum: PowerLaw
488    Prefactor:  1.876e-08  1.146e-03  0.000e+00  1.000e+06 ( 1.000e-14)
489        Index:  2.175e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
490        Scale:  2.145e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
502    Prefactor:  8.985e-01  7.853e-02  0.000e+00  1.000e+01 ( 1.000e+00)
503        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
504        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
497   Normalization:  1.105e+00  1.711e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): -0.00
Ra Dec: 359.588 38.510
Photon Flux Upper Limit: 5.05631496681e-08 ph cm-2 s-1
Energy Flux Upper Limit: 0.00384520705845 MeV cm-2 s-1

Saving results to:
/lscratch/kocevski/19663755/likelihoodResults_711072001_711331201_4FGL_J2358.3+3830_daily_bin1820.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) = 9983.79497579
delta logL = -0.0273071840274

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 9983.76766877
delta logL = -1.62373908097e-07

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .47673E-06   1.0000          .0000       .10000E+07
     2 'Index     '    .59748       1.0000          .0000       10.000    
     3 'Normalizat'    1.1054       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .89847       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5050E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   9983.676     FROM MIGRAD    STATUS=CONVERGED    157 CALLS      325 TOTAL
                     EDM=   .62E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .92455E-02    .18905E-01    .42118E-03** at limit **
   2  Index         5.2479        .75514        .65269E-01    .42758E-03
   3  Normalizat    1.0785        .17539        .72548E-01    .19828E-04
   4  Prefactor     .90549        .79313E-01    .44986E-01    .88027E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.00924545
  Index      = 5.24794
  Normalizat = 1.07851
  Prefactor  = 0.905492
 **********
 **   18 **HESSE 
 **********

 FCN=   9983.676     FROM HESSE     STATUS=NOT POSDEF    33 CALLS      358 TOTAL
                     EDM=   .43E-05    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .92455E-02    2.4346        .18277E-04   -1.5710    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         5.2479        7.0958        .13004E-01    .49609E-01
   3  Normalizat    1.0785        .20455        .32104E-03   -.90445    
   4  Prefactor     .90549        .88652E-01    .16470E-03   -.95949    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 4.2756e-06
Minuit parameter uncertainties:
  1  0.30006
  2  11.3982
  3  0.204702
  4  0.0886663
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 9983.67580623
delta logL = 0.0918623740854

Extracting fit parameters...

4FGL J2358.3+3830
   Spectrum: PowerLaw
488    Prefactor:  9.245e-03  3.001e-01  0.000e+00  1.000e+06 ( 1.000e-14)
489        Index:  5.248e+00  1.140e+01  0.000e+00  1.000e+01 (-1.000e+00)
490        Scale:  2.145e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
502    Prefactor:  9.055e-01  8.867e-02  0.000e+00  1.000e+01 ( 1.000e+00)
503        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
504        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
497   Normalization:  1.079e+00  2.047e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): -0.00
Ra Dec: 359.588 38.510

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/19663755/cmap_HighResolution_711072001_711331201_4FGL_J2358.3+3830_daily_bin1820.png

Cleaning up...

** Nuclear option initiated! **

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='3.85e-03', job_status='DONE', photon_flux_upper_limit='5.06e-08', time_completed='2023-07-18 01:55:22.387461', job_id='19663755', GAL2='0.91', fit_tolerance='1e-08', EG2='1.08', EG='1.11', time_epoch_completed='1689670522.39', return_code2='102', ts='-0.00', comment='SUCCESS', return_code='0', GAL='0.90', dlogl='9.19e-02', ts2='0.21', photon_index_error='0.00', photon_index='2.17' WHERE bin_id='1820' AND source_name='4FGL J2358.3+3830' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Tue Jul 18 01:55:23 PDT 2023

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/19664185/ft1_filtered_4FGL_J2358.3+3830_daily_bin1820.fits.....................!
real 38.98
user 37.35
sys 0.99

Creating the likelihood object...
obs = UnbinnedObs('/lscratch/kocevski/19664185/ft1_filtered_4FGL_J2358.3+3830_daily_bin1820.fits', '/lscratch/kocevski/19664185/ft2_4FGL_J2358.3+3830_daily_bin1820.fits', expMap='/lscratch/kocevski/19664185/expmap_711072001_711331201_4FGL_J2358.3+3830_daily_bin1820.fits', expCube='/lscratch/kocevski/19664185/ltcube_711072001_711331201_4FGL_J2358.3+3830_daily_bin1820.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/lscratch/kocevski/19664185/Model_4FGL_J2358.3+3830_daily_bin1820.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J2358.3+3830'

4FGL J2358.3+3830
   Spectrum: PowerLaw
488    Prefactor:  8.894e+00  0.000e+00  0.000e+00  1.000e+06 ( 1.000e-14)
489        Index:  2.175e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
490        Scale:  2.145e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /lscratch/kocevski/19664185/ft1_filtered_4FGL_J2358.3+3830_daily_bin1820.fits
Spacecraft file(s): /lscratch/kocevski/19664185/ft2_4FGL_J2358.3+3830_daily_bin1820.fits
Exposure map: /lscratch/kocevski/19664185/expmap_711072001_711331201_4FGL_J2358.3+3830_daily_bin1820.fits
Exposure cube: /lscratch/kocevski/19664185/ltcube_711072001_711331201_4FGL_J2358.3+3830_daily_bin1820.fits
IRFs: P8R3_SOURCE_V2
Source model file: /lscratch/kocevski/19664185/Model_4FGL_J2358.3+3830_daily_bin1820.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) = 9983.80012822

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    30.326       1.0000          .0000       .10000E+07
     2 'norm      '    .14670E-02   1.0000          .0000       .10000E+07
     3 'Prefactor '    .30748E-04   1.0000          .0000       .10000E+07
     4 'Prefactor '    .16328E-02   1.0000          .0000       .10000E+07
     5 'Prefactor '    .12607E-03   1.0000          .0000       .10000E+07
     6 'Prefactor '    .87305E-03   1.0000          .0000       .10000E+07
     7 'Prefactor '    22.363       1.0000          .0000       .10000E+07
     8 'Prefactor '    .23434E-02   1.0000          .0000       .10000E+07
     9 'norm      '    .95018       1.0000          .0000       .10000E+07
    10 'Prefactor '    .51043E-04   1.0000          .0000       .10000E+07
    11 'Prefactor '    .17117E-02   1.0000          .0000       .10000E+07
    12 'norm      '    1.0996       1.0000          .0000       .10000E+07
    13 'Prefactor '    10.699       1.0000          .0000       .10000E+07
    14 'norm      '    .18361E-05   1.0000          .0000       .10000E+07
    15 'norm      '    .24221E-05   1.0000          .0000       .10000E+07
    16 'Prefactor '    18.479       1.0000          .0000       .10000E+07
    17 'norm      '    .38408E-06   1.0000          .0000       .10000E+07
    18 'Prefactor '    .21663E-01   1.0000          .0000       .10000E+07
    19 'Prefactor '    .28500E-02   1.0000          .0000       .10000E+07
    20 'Prefactor '    .33415E-02   1.0000          .0000       .10000E+07
    21 'Prefactor '    .11739E-01   1.0000          .0000       .10000E+07
    22 'Normalizat'    1.1057       1.0000         .10000E-01   10.000    
    23 'Prefactor '    .89857       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5050E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   9983.768     FROM MIGRAD    STATUS=CONVERGED    128 CALLS     1822 TOTAL
                     EDM=   .84E-10  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  3.1%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     30.367        1.1880        .95607E-08   -.12711E-02
   2  norm          .52569E-07    5.0695       -.11876E-05** at limit **
   3  Prefactor     .16653E-08    6.7676       -.57345E-06** at limit **
   4  Prefactor     .26978E-07    3.6872       -.22000E-06** at limit **
   5  Prefactor      .0000        1.5355       -.41159E-06** at limit **
   6  Prefactor     .38858E-09    5.8786        .10086E-06** at limit **
   7  Prefactor     22.786        1.6030        .10927E-06   -.15828E-02
   8  Prefactor     .38802E-07    3.1589        .53768E-06** at limit **
   9  norm          .95224        1.6380        .11350E-06    .27258E-04
  10  Prefactor      .0000        1.3173       -.67483E-07** at limit **
  11  Prefactor     .55844E-07    17.534       -.31836E-05** at limit **
  12  norm          1.1014        .92263        .16916E-07    .97498E-03
  13  Prefactor     10.774        8.8317        .22957E-06    .43752E-03
  14  norm           .0000        1.4469        .38520E-06** at limit **
  15  norm          .11585E-06    6.0979       -.73889E-06** at limit **
  16  Prefactor     18.458        3.4316       -.26259E-06    .37467E-02
  17  norm           .0000        .76264       -.12230E-06** at limit **
  18  Prefactor      .0000        17.117        .88447E-07** at limit **
  19  Prefactor     .41023E-07    6.8612        .20773E-05** at limit **
  20  Prefactor     .18763E-07    14.165        .15429E-06** at limit **
  21  Prefactor     .25441E-06    2.8479        .56915E-07** at limit **
  22  Normalizat    1.1054        .19120        .73052E-05    .55608E-04
  23  Prefactor     .89846        .90944E-01   -.35598E-05    .11047E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 30.3668
  norm       = 5.25691e-08
  Prefactor  = 1.66533e-09
  Prefactor  = 2.69784e-08
  Prefactor  = 0
  Prefactor  = 3.88578e-10
  Prefactor  = 22.7863
  Prefactor  = 3.88023e-08
  norm       = 0.952245
  Prefactor  = 0
  Prefactor  = 5.58442e-08
  norm       = 1.10137
  Prefactor  = 10.7736
  norm       = 0
  norm       = 1.15852e-07
  Prefactor  = 18.4576
  norm       = 0
  Prefactor  = 0
  Prefactor  = 4.10227e-08
  Prefactor  = 1.87628e-08
  Prefactor  = 2.54408e-07
  Normalizat = 1.10543
  Prefactor  = 0.898458
 **********
 **   18 **HESSE 
 **********

 FCN=   9983.768     FROM HESSE     STATUS=OK           410 CALLS     2232 TOTAL
                     EDM=   .39E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     30.367        18.585        .18162E-03   -1.5598    
   2  norm          .52569E-07    21.049        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     .16653E-08    6.8574        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .26978E-07    10.224        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor      .0000        1.5223        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .38858E-09    5.9127        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     22.786        22.924        .21152E-03   -1.5612    
   8  Prefactor     .38802E-07    9.2683        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  norm          .95224        1.6457        .42351E-03   -1.5688    
  10  Prefactor      .0000        1.3176        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     .55844E-07    21.433        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  norm          1.1014        1.0208        .19883E-02   -1.5687    
  13  Prefactor     10.774        8.8613        .30607E-03   -1.5642    
  14  norm           .0000        1.4475        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  norm          .11585E-06    12.087        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor     18.458        15.477        .23272E-03   -1.5622    
  17  norm           .0000        .76376        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor      .0000        17.082        .16930E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Prefactor     .41023E-07    8.5388        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     .18763E-07    17.523        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  Prefactor     .25441E-06    23.304        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  Normalizat    1.1054        .17097        .71751E-01   -.89578    
  23  Prefactor     .89846        .78519E-01    .44987E-01   -.96195    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.85047e-08
Minuit parameter uncertainties:
  1  18.5849
  2  0.00210352
  3  0.000212018
  4  0.00105063
  5  1.16316e-06
  6  9.30168e-05
  7  22.9242
  8  0.00119908
  9  1.64567
  10  2.44284e-06
  11  0.0021883
  12  1.02083
  13  8.86133
  14  4.45409e-06
  15  0.0023664
  16  15.4773
  17  3.96882e-06
  18  1.17879e-05
  19  0.0011835
  20  0.0011463
  21  0.00487006
  22  0.171052
  23  0.0785289
number of points = 7459
number of fields = 31
RA_SUN column already exists. File will not be modified.
Done.


Performing analysis on: 4FGL_J2358.3+3830_daily_bin1820
RA = 359.588, Dec = 38.5097
tmin = 711072001, tmax = 711331201
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='19664656', job_status='RUN', time_executed='2023-07-18 01:53:10.709258', time_epoch_executed='1689670390.71' WHERE source_name='4FGL J2358.3+3830' and cadence='daily' and bin_id='1820'

Database successfully updated.
Done.

Creating custom output directory:
/lscratch/kocevski/19664656

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/lscratch/kocevski/19664656/ft1_4FGL_J2358.3+3830_daily_bin1820.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/lscratch/kocevski/19664656/ft2_4FGL_J2358.3+3830_daily_bin1820.fits


Selecting the photons:
time -p gtselect infile=/lscratch/kocevski/19664656/ft1_4FGL_J2358.3+3830_daily_bin1820.fits outfile=/lscratch/kocevski/19664656/ft1_filteredMKT_4FGL_J2358.3+3830_daily_bin1820.fits ra=359.588 dec=38.5097 rad=12.0 tmin=711072001.0 tmax=711331201.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 2.56
user 1.59
sys 0.19

Adding sun position to ft2 file:
/sdf/group/fermi/g/LCRepository/Repository/bin/sunpos /lscratch/kocevski/19664656/ft2_4FGL_J2358.3+3830_daily_bin1820.fits

Selecting the good time intervals:
time -p gtmktime scfile=/lscratch/kocevski/19664656/ft2_4FGL_J2358.3+3830_daily_bin1820.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/19664656/ft1_filteredMKT_4FGL_J2358.3+3830_daily_bin1820.fits evtable="EVENTS" outfile="/lscratch/kocevski/19664656/ft1_filtered_4FGL_J2358.3+3830_daily_bin1820.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 1.19
user 0.17
sys 0.15

Number of photons that the gtmktime cut: 938

Generating the livetime cube:
time -p gtltcube evfile="/lscratch/kocevski/19664656/ft1_filtered_4FGL_J2358.3+3830_daily_bin1820.fits" evtable="EVENTS" scfile=/lscratch/kocevski/19664656/ft2_4FGL_J2358.3+3830_daily_bin1820.fits sctable="SC_DATA" ouDone.

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

Extracting fit parameters...

4FGL J2358.3+3830
   Spectrum: PowerLaw
488    Prefactor:  1.876e-08  1.146e-03  0.000e+00  1.000e+06 ( 1.000e-14)
489        Index:  2.175e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
490        Scale:  2.145e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
502    Prefactor:  8.985e-01  7.853e-02  0.000e+00  1.000e+01 ( 1.000e+00)
503        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
504        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
497   Normalization:  1.105e+00  1.711e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): -0.00
Ra Dec: 359.588 38.510
Photon Flux Upper Limit: 5.05631496681e-08 ph cm-2 s-1
Energy Flux Upper Limit: 0.00384520705845 MeV cm-2 s-1

Saving results to:
/lscratch/kocevski/19664185/likelihoodResults_711072001_711331201_4FGL_J2358.3+3830_daily_bin1820.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) = 9983.79497579
delta logL = -0.0273071840274

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 9983.76766877
delta logL = -1.62373908097e-07

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .47673E-06   1.0000          .0000       .10000E+07
     2 'Index     '    .59748       1.0000          .0000       10.000    
     3 'Normalizat'    1.1054       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .89847       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5050E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   9983.676     FROM MIGRAD    STATUS=CONVERGED    157 CALLS      325 TOTAL
                     EDM=   .62E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .92455E-02    .18905E-01    .42118E-03** at limit **
   2  Index         5.2479        .75514        .65269E-01    .42758E-03
   3  Normalizat    1.0785        .17539        .72548E-01    .19828E-04
   4  Prefactor     .90549        .79313E-01    .44986E-01    .88027E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.00924545
  Index      = 5.24794
  Normalizat = 1.07851
  Prefactor  = 0.905492
 **********
 **   18 **HESSE 
 **********

 FCN=   9983.676     FROM HESSE     STATUS=NOT POSDEF    33 CALLS      358 TOTAL
                     EDM=   .43E-05    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .92455E-02    2.4346        .18277E-04   -1.5710    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         5.2479        7.0958        .13004E-01    .49609E-01
   3  Normalizat    1.0785        .20455        .32104E-03   -.90445    
   4  Prefactor     .90549        .88652E-01    .16470E-03   -.95949    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 4.2756e-06
Minuit parameter uncertainties:
  1  0.30006
  2  11.3982
  3  0.204702
  4  0.0886663
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 9983.67580623
delta logL = 0.0918623740854

Extracting fit parameters...

4FGL J2358.3+3830
   Spectrum: PowerLaw
488    Prefactor:  9.245e-03  3.001e-01  0.000e+00  1.000e+06 ( 1.000e-14)
489        Index:  5.248e+00  1.140e+01  0.000e+00  1.000e+01 (-1.000e+00)
490        Scale:  2.145e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
502    Prefactor:  9.055e-01  8.867e-02  0.000e+00  1.000e+01 ( 1.000e+00)
503        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
504        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
497   Normalization:  1.079e+00  2.047e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): -0.00
Ra Dec: 359.588 38.510

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/19664185/cmap_HighResolution_711072001_711331201_4FGL_J2358.3+3830_daily_bin1820.png

Cleaning up...

** Nuclear option initiated! **

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='3.85e-03', job_status='DONE', photon_flux_upper_limit='5.06e-08', time_completed='2023-07-18 01:58:26.069092', job_id='19664185', GAL2='0.91', fit_tolerance='1e-08', EG2='1.08', EG='1.11', time_epoch_completed='1689670706.07', return_code2='102', ts='-0.00', comment='SUCCESS', return_code='0', GAL='0.90', dlogl='9.19e-02', ts2='0.21', photon_index_error='0.00', photon_index='2.17' WHERE bin_id='1820' AND source_name='4FGL J2358.3+3830' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Tue Jul 18 01:58:27 PDT 2023

tfile=/lscratch/kocevski/19664656/ltcube_711072001_711331201_4FGL_J2358.3+3830_daily_bin1820.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/19664656/ft2_4FGL_J2358.3+3830_daily_bin1820.fits
.....................!
real 7.54
user 6.67
sys 0.23

Generating the exposure map:
time -p gtexpmap evfile=/lscratch/kocevski/19664656/ft1_filtered_4FGL_J2358.3+3830_daily_bin1820.fits evtable="EVENTS" scfile=/lscratch/kocevski/19664656/ft2_4FGL_J2358.3+3830_daily_bin1820.fits sctable="SC_DATA" expcube=/lscratch/kocevski/19664656/ltcube_711072001_711331201_4FGL_J2358.3+3830_daily_bin1820.fits outfile=/lscratch/kocevski/19664656/expmap_711072001_711331201_4FGL_J2358.3+3830_daily_bin1820.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/19664656/ltcube_711072001_711331201_4FGL_J2358.3+3830_daily_bin1820.fits
.....................!
real 59.82
user 55.57
sys 3.44

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 154 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 J2358.3+3830 @ 359.588 38.5097

Creating the counts map:
time -p gtbin evfile=/lscratch/kocevski/19664656/ft1_filtered_4FGL_J2358.3+3830_daily_bin1820.fits scfile=/lscratch/kocevski/19664656/ft2_4FGL_J2358.3+3830_daily_bin1820.fits outfile=/lscratch/kocevski/19664656/cmap_711072001_711331201_4FGL_J2358.3+3830_daily_bin1820.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=359.588 yref=38.5097 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.95
user 0.20
sys 0.13

Creating the high resolution counts map:
time -p gtbin evfile=/lscratch/kocevski/19664656/ft1_filtered_4FGL_J2358.3+3830_daily_bin1820.fits scfile=/lscratch/kocevski/19664656/ft2_4FGL_J2358.3+3830_daily_bin1820.fits outfile=/lscratch/kocevski/19664656/cmap_HighResolution_711072001_711331201_4FGL_J2358.3+3830_daily_bin1820.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=359.588 yref=38.5097 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.85
user 0.20
sys 0.14

Computing the diffuse response:
time -p gtdiffrsp evfile=/lscratch/kocevski/19664656/ft1_filtered_4FGL_J2358.3+3830_daily_bin1820.fits evtable="EVENTS" scfile=/lscratch/kocevski/19664656/ft2_4FGL_J2358.3+3830_daily_bin1820.fits sctable="SC_DATA" srcmdl=/lscratch/kocevski/19664656/Model_4FGL_J2358.3+3830_daily_bin1820.xml irfs="P8R3_SOURCE_number of points = 7459
number of fields = 31
RA_SUN column already exists. File will not be modified.
Done.


Performing analysis on: 4FGL_J2358.3+3830_daily_bin1820
RA = 359.588, Dec = 38.5097
tmin = 711072001, tmax = 711331201
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='19665059', job_status='RUN', time_executed='2023-07-18 01:55:17.449266', time_epoch_executed='1689670517.45' WHERE source_name='4FGL J2358.3+3830' and cadence='daily' and bin_id='1820'

Database successfully updated.
Done.

Creating custom output directory:
/lscratch/kocevski/19665059

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/lscratch/kocevski/19665059/ft1_4FGL_J2358.3+3830_daily_bin1820.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/lscratch/kocevski/19665059/ft2_4FGL_J2358.3+3830_daily_bin1820.fits


Selecting the photons:
time -p gtselect infile=/lscratch/kocevski/19665059/ft1_4FGL_J2358.3+3830_daily_bin1820.fits outfile=/lscratch/kocevski/19665059/ft1_filteredMKT_4FGL_J2358.3+3830_daily_bin1820.fits ra=359.588 dec=38.5097 rad=12.0 tmin=711072001.0 tmax=711331201.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 2.77
user 1.72
sys 0.17

Adding sun position to ft2 file:
/sdf/group/fermi/g/LCRepository/Repository/bin/sunpos /lscratch/kocevski/19665059/ft2_4FGL_J2358.3+3830_daily_bin1820.fits

Selecting the good time intervals:
time -p gtmktime scfile=/lscratch/kocevski/19665059/ft2_4FGL_J2358.3+3830_daily_bin1820.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/19665059/ft1_filteredMKT_4FGL_J2358.3+3830_daily_bin1820.fits evtable="EVENTS" outfile="/lscratch/kocevski/19665059/ft1_filtered_4FGL_J2358.3+3830_daily_bin1820.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.95
user 0.20
sys 0.12

Number of photons that the gtmktime cut: 938

Generating the livetime cube:
time -p gtltcube evfile="/lscratch/kocevski/19665059/ft1_filtered_4FGL_J2358.3+3830_daily_bin1820.fits" evtable="EVENTS" scfile=/lscratch/kocevski/19665059/ft2_4FGL_J2358.3+3830_daily_bin1820.fits sctable="SC_DATA" outfile=/lscratch/kocevski/19665059/ltcube_711072001_711331201_4FGL_J2358.3+3830_daily_bin1820.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/19665059/ft2_4FGL_J2358.3+3830_daily_bin1820.fits
.....................!
real 8.19
user 7.28
sys 0.24

Generating the exposure map:
time -p gtexpmap evfile=/lscratch/kocevski/19665059/ft1_filtered_4FGL_J2358.3+3830_daily_bin1820.fits evtable="EVENTS" scfile=/lscratch/kocevski/19665059/ft2_4FGL_J2358.3+3830_daily_bin1820.fits sctable="SC_DATA" expcube=/lscratch/kocevski/19665059/ltcube_711072001_711331201_4FGL_J2358.3+3830_daily_bin1820.fits outfile=/lscratch/kocevski/19665059/expmap_711072001_711331201_4FGL_J2358.3+3830_daily_bin1820.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/19665059/ltcube_711072001_711331201_4FGL_J2358.3+3830_daily_bin1820.fits
.....................!
real 65.23
user 60.77
sys 3.49

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 154 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 J2358.3+3830 @ 359.588 38.5097

Creating the counts map:
time -p gtbin evfile=/lscratch/kocevski/19665059/ft1_filtered_4FGL_J2358.3+3830_daily_bin1820.fits scfile=/lscratch/kocevski/19665059/ft2_4FGL_J2358.3+3830_daily_bin1820.fits outfile=/lscratch/kocevski/19665059/cmap_711072001_711331201_4FGL_J2358.3+3830_daily_bin1820.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=359.588 yref=38.5097 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 1.26
user 0.21
sys 0.13

Creating the high resolution counts map:
time -p gtbin evfile=/lscratch/kocevski/19665059/ft1_filtered_4FGL_J2358.3+3830_daily_bin1820.fits scfile=/lscratch/kocevski/19665059/ft2_4FGL_J2358.3+3830_daily_bin1820.fits outfile=/lscratch/kocevski/19665059/cmap_HighResolution_711072001_711331201_4FGL_J2358.3+3830_daily_bin1820.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=359.588 yref=38.5097 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 1.24
user 0.21
sys 0.13

Computing the diffuse response:
time -p gtdiffrsp evfile=/lscratch/kocevski/19665059/ft1_filtered_4FGL_J2358.3+3830_daily_bin1820.fits evtable="EVENTS" scfile=/lscratch/kocevski/19665059/ft2_4FGL_J2358.3+3830_daily_bin1820.fits sctable="SC_DATA" srcmdl=/lscratch/kocevski/19665059/Model_4FGL_J2358.3+3830_daily_bin1820.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/19664656/ft1_filtered_4FGL_J2358.3+3830_daily_bin1820.fits.....................!
real 37.08
user 35.18
sys 0.88

Creating the likelihood object...
obs = UnbinnedObs('/lscratch/kocevski/19664656/ft1_filtered_4FGL_J2358.3+3830_daily_bin1820.fits', '/lscratch/kocevski/19664656/ft2_4FGL_J2358.3+3830_daily_bin1820.fits', expMap='/lscratch/kocevski/19664656/expmap_711072001_711331201_4FGL_J2358.3+3830_daily_bin1820.fits', expCube='/lscratch/kocevski/19664656/ltcube_711072001_711331201_4FGL_J2358.3+3830_daily_bin1820.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/lscratch/kocevski/19664656/Model_4FGL_J2358.3+3830_daily_bin1820.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J2358.3+3830'

4FGL J2358.3+3830
   Spectrum: PowerLaw
488    Prefactor:  8.894e+00  0.000e+00  0.000e+00  1.000e+06 ( 1.000e-14)
489        Index:  2.175e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
490        Scale:  2.145e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /lscratch/kocevski/19664656/ft1_filtered_4FGL_J2358.3+3830_daily_bin1820.fits
Spacecraft file(s): /lscratch/kocevski/19664656/ft2_4FGL_J2358.3+3830_daily_bin1820.fits
Exposure map: /lscratch/kocevski/19664656/expmap_711072001_711331201_4FGL_J2358.3+3830_daily_bin1820.fits
Exposure cube: /lscratch/kocevski/19664656/ltcube_711072001_711331201_4FGL_J2358.3+3830_daily_bin1820.fits
IRFs: P8R3_SOURCE_V2
Source model file: /lscratch/kocevski/19664656/Model_4FGL_J2358.3+3830_daily_bin1820.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) = 9983.80012822

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    30.326       1.0000          .0000       .10000E+07
     2 'norm      '    .14670E-02   1.0000          .0000       .10000E+07
     3 'Prefactor '    .30748E-04   1.0000          .0000       .10000E+07
     4 'Prefactor '    .16328E-02   1.0000          .0000       .10000E+07
     5 'Prefactor '    .12607E-03   1.0000          .0000       .10000E+07
     6 'Prefactor '    .87305E-03   1.0000          .0000       .10000E+07
     7 'Prefactor '    22.363       1.0000          .0000       .10000E+07
     8 'Prefactor '    .23434E-02   1.0000          .0000       .10000E+07
     9 'norm      '    .95018       1.0000          .0000       .10000E+07
    10 'Prefactor '    .51043E-04   1.0000          .0000       .10000E+07
    11 'Prefactor '    .17117E-02   1.0000          .0000       .10000E+07
    12 'norm      '    1.0996       1.0000          .0000       .10000E+07
    13 'Prefactor '    10.699       1.0000          .0000       .10000E+07
    14 'norm      '    .18361E-05   1.0000          .0000       .10000E+07
    15 'norm      '    .24221E-05   1.0000          .0000       .10000E+07
    16 'Prefactor '    18.479       1.0000          .0000       .10000E+07
    17 'norm      '    .38408E-06   1.0000          .0000       .10000E+07
    18 'Prefactor '    .21663E-01   1.0000          .0000       .10000E+07
    19 'Prefactor '    .28500E-02   1.0000          .0000       .10000E+07
    20 'Prefactor '    .33415E-02   1.0000          .0000       .10000E+07
    21 'Prefactor '    .11739E-01   1.0000          .0000       .10000E+07
    22 'Normalizat'    1.1057       1.0000         .10000E-01   10.000    
    23 'Prefactor '    .89857       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5050E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   9983.768     FROM MIGRAD    STATUS=CONVERGED    128 CALLS     1822 TOTAL
                     EDM=   .84E-10  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  3.1%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     30.367        1.1880        .95607E-08   -.12711E-02
   2  norm          .52569E-07    5.0695       -.11876E-05** at limit **
   3  Prefactor     .16653E-08    6.7676       -.57345E-06** at limit **
   4  Prefactor     .26978E-07    3.6872       -.22000E-06** at limit **
   5  Prefactor      .0000        1.5355       -.41159E-06** at limit **
   6  Prefactor     .38858E-09    5.8786        .10086E-06** at limit **
   7  Prefactor     22.786        1.6030        .10927E-06   -.15828E-02
   8  Prefactor     .38802E-07    3.1589        .53768E-06** at limit **
   9  norm          .95224        1.6380        .11350E-06    .27258E-04
  10  Prefactor      .0000        1.3173       -.67483E-07** at limit **
  11  Prefactor     .55844E-07    17.534       -.31836E-05** at limit **
  12  norm          1.1014        .92263        .16916E-07    .97498E-03
  13  Prefactor     10.774        8.8317        .22957E-06    .43752E-03
  14  norm           .0000        1.4469        .38520E-06** at limit **
  15  norm          .11585E-06    6.0979       -.73889E-06** at limit **
  16  Prefactor     18.458        3.4316       -.26259E-06    .37467E-02
  17  norm           .0000        .76264       -.12230E-06** at limit **
  18  Prefactor      .0000        17.117        .88447E-07** at limit **
  19  Prefactor     .41023E-07    6.8612        .20773E-05** at limit **
  20  Prefactor     .18763E-07    14.165        .15429E-06** at limit **
  21  Prefactor     .25441E-06    2.8479        .56915E-07** at limit **
  22  Normalizat    1.1054        .19120        .73052E-05    .55608E-04
  23  Prefactor     .89846        .90944E-01   -.35598E-05    .11047E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 30.3668
  norm       = 5.25691e-08
  Prefactor  = 1.66533e-09
  Prefactor  = 2.69784e-08
  Prefactor  = 0
  Prefactor  = 3.88578e-10
  Prefactor  = 22.7863
  Prefactor  = 3.88023e-08
  norm       = 0.952245
  Prefactor  = 0
  Prefactor  = 5.58442e-08
  norm       = 1.10137
  Prefactor  = 10.7736
  norm       = 0
  norm       = 1.15852e-07
  Prefactor  = 18.4576
  norm       = 0
  Prefactor  = 0
  Prefactor  = 4.10227e-08
  Prefactor  = 1.87628e-08
  Prefactor  = 2.54408e-07
  Normalizat = 1.10543
  Prefactor  = 0.898458
 **********
 **   18 **HESSE 
 **********

 FCN=   9983.768     FROM HESSE     STATUS=OK           410 CALLS     2232 TOTAL
                     EDM=   .39E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     30.367        18.585        .18162E-03   -1.5598    
   2  norm          .52569E-07    21.049        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     .16653E-08    6.8574        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .26978E-07    10.224        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor      .0000        1.5223        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .38858E-09    5.9127        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     22.786        22.924        .21152E-03   -1.5612    
   8  Prefactor     .38802E-07    9.2683        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  norm          .95224        1.6457        .42351E-03   -1.5688    
  10  Prefactor      .0000        1.3176        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     .55844E-07    21.433        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  norm          1.1014        1.0208        .19883E-02   -1.5687    
  13  Prefactor     10.774        8.8613        .30607E-03   -1.5642    
  14  norm           .0000        1.4475        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  norm          .11585E-06    12.087        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor     18.458        15.477        .23272E-03   -1.5622    
  17  norm           .0000        .76376        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor      .0000        17.082        .16930E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Prefactor     .41023E-07    8.5388        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     .18763E-07    17.523        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  Prefactor     .25441E-06    23.304        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  Normalizat    1.1054        .17097        .71751E-01   -.89578    
  23  Prefactor     .89846        .78519E-01    .44987E-01   -.96195    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.85047e-08
Minuit parameter uncertainties:
  1  18.5849
  2  0.00210352
  3  0.000212018
  4  0.00105063
  5  1.16316e-06
  6  9.30168e-05
  7  22.9242
  8  0.00119908
  9  1.64567
  10  2.44284e-06
  11  0.0021883
  12  1.02083
  13  8.86133
  14  4.45409e-06
  15  0.0023664
  16  15.4773
  17  3.96882e-06
  18  1.17879e-05
  19  0.0011835
  20  0.0011463
  21  0.00487006
  22  0.171052
  23  0.0785289
Done.

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

Extracting fit parameters...

4FGL J2358.3+3830
   Spectrum: PowerLaw
488    Prefactor:  1.876e-08  1.146e-03  0.000e+00  1.000e+06 ( 1.000e-14)
489        Index:  2.175e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
490        Scale:  2.145e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
502    Prefactor:  8.985e-01  7.853e-02  0.000e+00  1.000e+01 ( 1.000e+00)
503        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
504        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
497   Normalization:  1.105e+00  1.711e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): -0.00
Ra Dec: 359.588 38.510
Photon Flux Upper Limit: 5.05631496681e-08 ph cm-2 s-1
Energy Flux Upper Limit: 0.00384520705845 MeV cm-2 s-1

Saving results to:
/lscratch/kocevski/19664656/likelihoodResults_711072001_711331201_4FGL_J2358.3+3830_daily_bin1820.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) = 9983.79497579
delta logL = -0.0273071840274

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 9983.76766877
delta logL = -1.62373908097e-07

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .47673E-06   1.0000          .0000       .10000E+07
     2 'Index     '    .59748       1.0000          .0000       10.000    
     3 'Normalizat'    1.1054       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .89847       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5050E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   9983.676     FROM MIGRAD    STATUS=CONVERGED    157 CALLS      325 TOTAL
                     EDM=   .62E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .92455E-02    .18905E-01    .42118E-03** at limit **
   2  Index         5.2479        .75514        .65269E-01    .42758E-03
   3  Normalizat    1.0785        .17539        .72548E-01    .19828E-04
   4  Prefactor     .90549        .79313E-01    .44986E-01    .88027E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.00924545
  Index      = 5.24794
  Normalizat = 1.07851
  Prefactor  = 0.905492
 **********
 **   18 **HESSE 
 **********

 FCN=   9983.676     FROM HESSE     STATUS=NOT POSDEF    33 CALLS      358 TOTAL
                     EDM=   .43E-05    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .92455E-02    2.4346        .18277E-04   -1.5710    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         5.2479        7.0958        .13004E-01    .49609E-01
   3  Normalizat    1.0785        .20455        .32104E-03   -.90445    
   4  Prefactor     .90549        .88652E-01    .16470E-03   -.95949    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 4.2756e-06
Minuit parameter uncertainties:
  1  0.30006
  2  11.3982
  3  0.204702
  4  0.0886663
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 9983.67580623
delta logL = 0.0918623740854

Extracting fit parameters...

4FGL J2358.3+3830
   Spectrum: PowerLaw
488    Prefactor:  9.245e-03  3.001e-01  0.000e+00  1.000e+06 ( 1.000e-14)
489        Index:  5.248e+00  1.140e+01  0.000e+00  1.000e+01 (-1.000e+00)
490        Scale:  2.145e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
502    Prefactor:  9.055e-01  8.867e-02  0.000e+00  1.000e+01 ( 1.000e+00)
503        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
504        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
497   Normalization:  1.079e+00  2.047e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): -0.00
Ra Dec: 359.588 38.510

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/19664656/cmap_HighResolution_711072001_711331201_4FGL_J2358.3+3830_daily_bin1820.png

Cleaning up...

** Nuclear option initiated! **

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='3.85e-03', job_status='DONE', photon_flux_upper_limit='5.06e-08', time_completed='2023-07-18 02:02:33.266837', job_id='19664656', GAL2='0.91', fit_tolerance='1e-08', EG2='1.08', EG='1.11', time_epoch_completed='1689670953.27', return_code2='102', ts='-0.00', comment='SUCCESS', return_code='0', GAL='0.90', dlogl='9.19e-02', ts2='0.21', photon_index_error='0.00', photon_index='2.17' WHERE bin_id='1820' AND source_name='4FGL J2358.3+3830' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Tue Jul 18 02:02:34 PDT 2023

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/19665059/ft1_filtered_4FGL_J2358.3+3830_daily_bin1820.fits.....................!
real 40.06
user 38.21
sys 0.95

Creating the likelihood object...
obs = UnbinnedObs('/lscratch/kocevski/19665059/ft1_filtered_4FGL_J2358.3+3830_daily_bin1820.fits', '/lscratch/kocevski/19665059/ft2_4FGL_J2358.3+3830_daily_bin1820.fits', expMap='/lscratch/kocevski/19665059/expmap_711072001_711331201_4FGL_J2358.3+3830_daily_bin1820.fits', expCube='/lscratch/kocevski/19665059/ltcube_711072001_711331201_4FGL_J2358.3+3830_daily_bin1820.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/lscratch/kocevski/19665059/Model_4FGL_J2358.3+3830_daily_bin1820.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J2358.3+3830'

4FGL J2358.3+3830
   Spectrum: PowerLaw
488    Prefactor:  8.894e+00  0.000e+00  0.000e+00  1.000e+06 ( 1.000e-14)
489        Index:  2.175e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
490        Scale:  2.145e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /lscratch/kocevski/19665059/ft1_filtered_4FGL_J2358.3+3830_daily_bin1820.fits
Spacecraft file(s): /lscratch/kocevski/19665059/ft2_4FGL_J2358.3+3830_daily_bin1820.fits
Exposure map: /lscratch/kocevski/19665059/expmap_711072001_711331201_4FGL_J2358.3+3830_daily_bin1820.fits
Exposure cube: /lscratch/kocevski/19665059/ltcube_711072001_711331201_4FGL_J2358.3+3830_daily_bin1820.fits
IRFs: P8R3_SOURCE_V2
Source model file: /lscratch/kocevski/19665059/Model_4FGL_J2358.3+3830_daily_bin1820.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) = 9983.80012822

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    30.326       1.0000          .0000       .10000E+07
     2 'norm      '    .14670E-02   1.0000          .0000       .10000E+07
     3 'Prefactor '    .30748E-04   1.0000          .0000       .10000E+07
     4 'Prefactor '    .16328E-02   1.0000          .0000       .10000E+07
     5 'Prefactor '    .12607E-03   1.0000          .0000       .10000E+07
     6 'Prefactor '    .87305E-03   1.0000          .0000       .10000E+07
     7 'Prefactor '    22.363       1.0000          .0000       .10000E+07
     8 'Prefactor '    .23434E-02   1.0000          .0000       .10000E+07
     9 'norm      '    .95018       1.0000          .0000       .10000E+07
    10 'Prefactor '    .51043E-04   1.0000          .0000       .10000E+07
    11 'Prefactor '    .17117E-02   1.0000          .0000       .10000E+07
    12 'norm      '    1.0996       1.0000          .0000       .10000E+07
    13 'Prefactor '    10.699       1.0000          .0000       .10000E+07
    14 'norm      '    .18361E-05   1.0000          .0000       .10000E+07
    15 'norm      '    .24221E-05   1.0000          .0000       .10000E+07
    16 'Prefactor '    18.479       1.0000          .0000       .10000E+07
    17 'norm      '    .38408E-06   1.0000          .0000       .10000E+07
    18 'Prefactor '    .21663E-01   1.0000          .0000       .10000E+07
    19 'Prefactor '    .28500E-02   1.0000          .0000       .10000E+07
    20 'Prefactor '    .33415E-02   1.0000          .0000       .10000E+07
    21 'Prefactor '    .11739E-01   1.0000          .0000       .10000E+07
    22 'Normalizat'    1.1057       1.0000         .10000E-01   10.000    
    23 'Prefactor '    .89857       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5050E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   9983.768     FROM MIGRAD    STATUS=CONVERGED    128 CALLS     1822 TOTAL
                     EDM=   .84E-10  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  3.1%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     30.367        1.1880        .95607E-08   -.12711E-02
   2  norm          .52569E-07    5.0695       -.11876E-05** at limit **
   3  Prefactor     .16653E-08    6.7676       -.57345E-06** at limit **
   4  Prefactor     .26978E-07    3.6872       -.22000E-06** at limit **
   5  Prefactor      .0000        1.5355       -.41159E-06** at limit **
   6  Prefactor     .38858E-09    5.8786        .10086E-06** at limit **
   7  Prefactor     22.786        1.6030        .10927E-06   -.15828E-02
   8  Prefactor     .38802E-07    3.1589        .53768E-06** at limit **
   9  norm          .95224        1.6380        .11350E-06    .27258E-04
  10  Prefactor      .0000        1.3173       -.67483E-07** at limit **
  11  Prefactor     .55844E-07    17.534       -.31836E-05** at limit **
  12  norm          1.1014        .92263        .16916E-07    .97498E-03
  13  Prefactor     10.774        8.8317        .22957E-06    .43752E-03
  14  norm           .0000        1.4469        .38520E-06** at limit **
  15  norm          .11585E-06    6.0979       -.73889E-06** at limit **
  16  Prefactor     18.458        3.4316       -.26259E-06    .37467E-02
  17  norm           .0000        .76264       -.12230E-06** at limit **
  18  Prefactor      .0000        17.117        .88447E-07** at limit **
  19  Prefactor     .41023E-07    6.8612        .20773E-05** at limit **
  20  Prefactor     .18763E-07    14.165        .15429E-06** at limit **
  21  Prefactor     .25441E-06    2.8479        .56915E-07** at limit **
  22  Normalizat    1.1054        .19120        .73052E-05    .55608E-04
  23  Prefactor     .89846        .90944E-01   -.35598E-05    .11047E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 30.3668
  norm       = 5.25691e-08
  Prefactor  = 1.66533e-09
  Prefactor  = 2.69784e-08
  Prefactor  = 0
  Prefactor  = 3.88578e-10
  Prefactor  = 22.7863
  Prefactor  = 3.88023e-08
  norm       = 0.952245
  Prefactor  = 0
  Prefactor  = 5.58442e-08
  norm       = 1.10137
  Prefactor  = 10.7736
  norm       = 0
  norm       = 1.15852e-07
  Prefactor  = 18.4576
  norm       = 0
  Prefactor  = 0
  Prefactor  = 4.10227e-08
  Prefactor  = 1.87628e-08
  Prefactor  = 2.54408e-07
  Normalizat = 1.10543
  Prefactor  = 0.898458
 **********
 **   18 **HESSE 
 **********

 FCN=   9983.768     FROM HESSE     STATUS=OK           410 CALLS     2232 TOTAL
                     EDM=   .39E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     30.367        18.585        .18162E-03   -1.5598    
   2  norm          .52569E-07    21.049        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     .16653E-08    6.8574        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .26978E-07    10.224        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor      .0000        1.5223        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .38858E-09    5.9127        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     22.786        22.924        .21152E-03   -1.5612    
   8  Prefactor     .38802E-07    9.2683        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  norm          .95224        1.6457        .42351E-03   -1.5688    
  10  Prefactor      .0000        1.3176        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     .55844E-07    21.433        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  norm          1.1014        1.0208        .19883E-02   -1.5687    
  13  Prefactor     10.774        8.8613        .30607E-03   -1.5642    
  14  norm           .0000        1.4475        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  norm          .11585E-06    12.087        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor     18.458        15.477        .23272E-03   -1.5622    
  17  norm           .0000        .76376        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor      .0000        17.082        .16930E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Prefactor     .41023E-07    8.5388        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     .18763E-07    17.523        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  Prefactor     .25441E-06    23.304        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  Normalizat    1.1054        .17097        .71751E-01   -.89578    
  23  Prefactor     .89846        .78519E-01    .44987E-01   -.96195    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.85047e-08
Minuit parameter uncertainties:
  1  18.5849
  2  0.00210352
  3  0.000212018
  4  0.00105063
  5  1.16316e-06
  6  9.30168e-05
  7  22.9242
  8  0.00119908
  9  1.64567
  10  2.44284e-06
  11  0.0021883
  12  1.02083
  13  8.86133
  14  4.45409e-06
  15  0.0023664
  16  15.4773
  17  3.96882e-06
  18  1.17879e-05
  19  0.0011835
  20  0.0011463
  21  0.00487006
  22  0.171052
  23  0.0785289
Done.

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

Extracting fit parameters...

4FGL J2358.3+3830
   Spectrum: PowerLaw
488    Prefactor:  1.876e-08  1.146e-03  0.000e+00  1.000e+06 ( 1.000e-14)
489        Index:  2.175e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
490        Scale:  2.145e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
502    Prefactor:  8.985e-01  7.853e-02  0.000e+00  1.000e+01 ( 1.000e+00)
503        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
504        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
497   Normalization:  1.105e+00  1.711e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): -0.00
Ra Dec: 359.588 38.510
Photon Flux Upper Limit: 5.05631496681e-08 ph cm-2 s-1
Energy Flux Upper Limit: 0.00384520705845 MeV cm-2 s-1

Saving results to:
/lscratch/kocevski/19665059/likelihoodResults_711072001_711331201_4FGL_J2358.3+3830_daily_bin1820.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) = 9983.79497579
delta logL = -0.0273071840274

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 9983.76766877
delta logL = -1.62373908097e-07

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .47673E-06   1.0000          .0000       .10000E+07
     2 'Index     '    .59748       1.0000          .0000       10.000    
     3 'Normalizat'    1.1054       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .89847       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5050E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   9983.676     FROM MIGRAD    STATUS=CONVERGED    157 CALLS      325 TOTAL
                     EDM=   .62E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .92455E-02    .18905E-01    .42118E-03** at limit **
   2  Index         5.2479        .75514        .65269E-01    .42758E-03
   3  Normalizat    1.0785        .17539        .72548E-01    .19828E-04
   4  Prefactor     .90549        .79313E-01    .44986E-01    .88027E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.00924545
  Index      = 5.24794
  Normalizat = 1.07851
  Prefactor  = 0.905492
 **********
 **   18 **HESSE 
 **********

 FCN=   9983.676     FROM HESSE     STATUS=NOT POSDEF    33 CALLS      358 TOTAL
                     EDM=   .43E-05    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .92455E-02    2.4346        .18277E-04   -1.5710    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         5.2479        7.0958        .13004E-01    .49609E-01
   3  Normalizat    1.0785        .20455        .32104E-03   -.90445    
   4  Prefactor     .90549        .88652E-01    .16470E-03   -.95949    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 4.2756e-06
Minuit parameter uncertainties:
  1  0.30006
  2  11.3982
  3  0.204702
  4  0.0886663
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 9983.67580623
delta logL = 0.0918623740854

Extracting fit parameters...

4FGL J2358.3+3830
   Spectrum: PowerLaw
488    Prefactor:  9.245e-03  3.001e-01  0.000e+00  1.000e+06 ( 1.000e-14)
489        Index:  5.248e+00  1.140e+01  0.000e+00  1.000e+01 (-1.000e+00)
490        Scale:  2.145e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
502    Prefactor:  9.055e-01  8.867e-02  0.000e+00  1.000e+01 ( 1.000e+00)
503        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
504        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
497   Normalization:  1.079e+00  2.047e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): -0.00
Ra Dec: 359.588 38.510

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/19665059/cmap_HighResolution_711072001_711331201_4FGL_J2358.3+3830_daily_bin1820.png

Cleaning up...

** Nuclear option initiated! **

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='3.85e-03', job_status='DONE', photon_flux_upper_limit='5.06e-08', time_completed='2023-07-18 02:04:48.930564', job_id='19665059', GAL2='0.91', fit_tolerance='1e-08', EG2='1.08', EG='1.11', time_epoch_completed='1689671088.93', return_code2='102', ts='-0.00', comment='SUCCESS', return_code='0', GAL='0.90', dlogl='9.19e-02', ts2='0.21', photon_index_error='0.00', photon_index='2.17' WHERE bin_id='1820' AND source_name='4FGL J2358.3+3830' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Tue Jul 18 02:04:49 PDT 2023

