**********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5840E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   9141.319     FROM MIGRAD    STATUS=CONVERGED    180 CALLS     2274 TOTAL
                     EDM=   .36E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  1.5%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .69289E-06    100.84       -.47788E-05** at limit **
   2  norm           .0000        .26242       -.89529E-07** at limit **
   3  Prefactor      .0000        2.3420       -.49021E-06** at limit **
   4  norm          20.499        8.0338        .45424E-06   -.46884E-01
   5  Prefactor      .0000        11.102        .32498E-06** at limit **
   6  Prefactor     2.7451        3.2039       -.22378E-06   -.36486E-03
   7  Prefactor     .22204E-09    15.527        .11477E-05** at limit **
   8  norm          4.7425        3.2832       -.14197E-06   -.38905E-04
   9  Prefactor      .0000        2.6538        .37757E-06** at limit **
  10  Prefactor      .0000        5.4292        .11187E-05** at limit **
  11  Prefactor     .44203E-01    28.797       -.21687E-05** at limit **
  12  norm           .0000        2.9708       -.48619E-06** at limit **
  13  norm           .0000        3.7445       -.19592E-06** at limit **
  14  Prefactor     10.342        7.0231       -.49830E-06   -.47351E-01
  15  Prefactor     69.454        6.5683       -.21477E-07   -.14759    
  16  norm          .98574        .77684        .15584E-06    .59864E-02
  17  Prefactor     4.9758        3.9237        .46180E-06   -.33045E-02
  18  Prefactor     9.8878        6.2002        .16378E-06   -.88490E-03
  19  Prefactor      .0000        1.5983        .96428E-07** at limit **
  20  norm          .90542        .91229        .20908E-06    .69888E-04
  21  norm          3.2740        3.1102       -.10650E-06    .28883E-03
  22  Prefactor     7.2317        7.5380       -.87870E-07   -.34238E-02
  23  Prefactor     .66269E-06    80.547       -.27655E-05** at limit **
  24  Prefactor     .22204E-09    13.007       -.99825E-06** at limit **
  25  Normalizat    .99616        .16489        .11810E-05    .61873E-04
  26  Prefactor     1.1532        .19345        .35278E-05    .40854E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 6.9289e-07
  norm       = 0
  Prefactor  = 0
  norm       = 20.4993
  Prefactor  = 0
  Prefactor  = 2.74512
  Prefactor  = 2.22045e-10
  norm       = 4.7425
  Prefactor  = 0
  Prefactor  = 0
  Prefactor  = 0.0442029
  norm       = 0
  norm       = 0
  Prefactor  = 10.3424
  Prefactor  = 69.4536
  norm       = 0.985735
  Prefactor  = 4.97583
  Prefactor  = 9.88781
  Prefactor  = 0
  norm       = 0.905422
  norm       = 3.27404
  Prefactor  = 7.23175
  Prefactor  = 6.62692e-07
  Prefactor  = 2.22045e-10
  Normalizat = 0.996161
  Prefactor  = 1.15319
/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).

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

 FCN=   9141.319     FROM HESSE     STATUS=OK           514 CALLS     2788 TOTAL
                     EDM=   .43E-06    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .69289E-06    102.47        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  norm           .0000        .26126        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor      .0000        2.3143        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  norm          20.499        11.714        .22078E-03   -1.5617    
   5  Prefactor      .0000        11.118        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     2.7451        3.2067        .61250E-03   -1.5675    
   7  Prefactor     .22204E-09    15.527        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          4.7425        3.2927        .46180E-03   -1.5664    
   9  Prefactor      .0000        2.6586        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor      .0000        5.4323        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     .44203E-01    1.1697        .64948E-02   -1.5704    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  norm           .0000        2.9713        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm           .0000        3.7358        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     10.342        11.025        .31119E-03   -1.5644    
  15  Prefactor     69.454        33.961        .12016E-03   -1.5541    
  16  norm          .98574        8.6653        .43439E-03   -1.5688    
  17  Prefactor     4.9758        12.029        .44955E-03   -1.5663    
  18  Prefactor     9.8878        6.3476        .31850E-03   -1.5645    
  19  Prefactor      .0000        1.6002        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  norm          .90542        .91587        .45382E-03   -1.5689    
  21  norm          3.2740        3.1231        .55929E-03   -1.5672    
  22  Prefactor     7.2317        7.5810        .37260E-03   -1.5654    
  23  Prefactor     .66269E-06    81.948        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  Prefactor     .22204E-09    13.000        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  25  Normalizat    .99616        .13929        .46118E-01   -.93159    
  26  Prefactor     1.1532        .16186        .59736E-01   -.87784    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 4.26651e-07
Minuit parameter uncertainties:
  1  0.0168524
  2  2.46557e-07
  3  2.24407e-07
  4  11.7139
  5  3.19525e-05
  6  3.2067
  7  0.000116469
  8  3.2927
  9  1.03572e-06
  10  1.51673e-05
  11  0.454778
  12  5.32968e-06
  13  7.49415e-06
  14  11.0248
  15  33.9614
  16  5.84524
  17  12.0291
  18  6.34764
  19  3.42028e-06
  20  0.915866
  21  3.12307
  22  7.58103
  23  0.0147388
  24  0.000102898
  25  0.139338
  26  0.161927
Done.

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

Extracting fit parameters...

4FGL J1421.1+3859
   Spectrum: PowerLaw
291    Prefactor:  0.000e+00  1.517e-05  0.000e+00  1.000e+06 ( 1.000e-13)
292        Index:  2.670e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
293        Scale:  9.266e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
581    Prefactor:  1.153e+00  1.619e-01  0.000e+00  1.000e+01 ( 1.000e+00)
582        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
583        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
580   Normalization:  9.962e-01  1.393e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 0.00
Ra Dec: 215.292 38.997
Photon Flux Upper Limit: 4.88463218458e-08 ph cm-2 s-1
Energy Flux Upper Limit: 0.0038386544838 MeV cm-2 s-1

Saving results to:
/lscratch/kocevski/18909846/likelihoodResults_709516801_709776001_4FGL_J1421.1+3859_daily_bin1814.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): 102
logL (Free Index) = 9141.32478549
delta logL = -0.00585109422536

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 9141.31893479
delta logL = -3.95013557863e-07

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .31533E-05   1.0000          .0000       .10000E+07
     2 'Index     '    2.8326       1.0000          .0000       10.000    
     3 'Normalizat'    .99617       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.1532       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5840E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   9141.319     FROM MIGRAD    STATUS=CONVERGED     71 CALLS      253 TOTAL
                     EDM=   .87E-12    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .55511E-10    .22656        .42118E-03** at limit **
   2  Index         1.3901        7.4895        .50000       -.36380E-10
   3  Normalizat    .99616        .68068E-03    .46119E-01    .26055E-03
   4  Prefactor     1.1532        .80414E-03    .59736E-01    .26730E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 5.55112e-11
  Index      = 1.39008
  Normalizat = 0.996161
  Prefactor  = 1.15319
 **********
 **   18 **HESSE 
 **********

 FCN=   9141.319     FROM HESSE     STATUS=NOT POSDEF    27 CALLS      280 TOTAL
                     EDM=   .44E-11    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .55511E-10    1.1346        .84235E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         1.3901        9.1864        .50000       -.80667    
   3  Normalizat    .99616        .15221E-02    .23970E-03   -.93159    
   4  Prefactor     1.1532        .17977E-02    .26418E-03   -.87784    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 4.35678e-12
Minuit parameter uncertainties:
  1  1.66053e-05
  2  59573.8
  3  0.00152213
  4  0.00179768
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) = 9141.3189344
delta logL = -2.91038304567e-11

Extracting fit parameters...

4FGL J1421.1+3859
   Spectrum: PowerLaw
291    Prefactor:  5.551e-11  1.661e-05  0.000e+00  1.000e+06 ( 1.000e-13)
292        Index:  1.390e+00  5.957e+04  0.000e+00  1.000e+01 (-1.000e+00)
293        Scale:  9.266e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
581    Prefactor:  1.153e+00  1.798e-03  0.000e+00  1.000e+01 ( 1.000e+00)
582        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
583        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
580   Normalization:  9.962e-01  1.522e-03  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 0.00
Ra Dec: 215.292 38.997

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/18909846/cmap_HighResolution_709516801_709776001_4FGL_J1421.1+3859_daily_bin1814.png

Cleaning up...

** Nuclear option initiated! **

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='3.84e-03', job_status='DONE', photon_flux_upper_limit='4.88e-08', time_completed='2023-07-10 12:31:47.102308', job_id='18909846', GAL2='1.15', fit_tolerance='1e-08', EG2='1.00', EG='1.00', time_epoch_completed='1689017507.1', return_code2='102', ts='0.00', comment='SUCCESS', return_code='0', GAL='1.15', dlogl='-2.91e-11', ts2='-0.00', photon_index_error='0.00', photon_index='2.67' WHERE bin_id='1814' AND source_name='4FGL J1421.1+3859' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Mon Jul 10 12:31:47 PDT 2023

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


Performing analysis on: 4FGL_J1421.1+3859_daily_bin1814
RA = 215.292, Dec = 38.9966
tmin = 709516801, tmax = 709776001
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='18910096', job_status='RUN', time_executed='2023-07-10 12:30:44.810555', time_epoch_executed='1689017444.81' WHERE source_name='4FGL J1421.1+3859' and cadence='daily' and bin_id='1814'

Database successfully updated.
Done.

Creating custom output directory:
/lscratch/kocevski/18910096

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/lscratch/kocevski/18910096/ft1_4FGL_J1421.1+3859_daily_bin1814.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/lscratch/kocevski/18910096/ft2_4FGL_J1421.1+3859_daily_bin1814.fits


Selecting the photons:
time -p gtselect infile=/lscratch/kocevski/18910096/ft1_4FGL_J1421.1+3859_daily_bin1814.fits outfile=/lscratch/kocevski/18910096/ft1_filteredMKT_4FGL_J1421.1+3859_daily_bin1814.fits ra=215.292 dec=38.9966 rad=12.0 tmin=709516801.0 tmax=709776001.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 1.28
user 1.09
sys 0.16

Adding sun position to ft2 file:
/sdf/group/fermi/g/LCRepository/Repository/bin/sunpos /lscratch/kocevski/18910096/ft2_4FGL_J1421.1+3859_daily_bin1814.fits

Selecting the good time intervals:
time -p gtmktime scfile=/lscratch/kocevski/18910096/ft2_4FGL_J1421.1+3859_daily_bin1814.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/18910096/ft1_filteredMKT_4FGL_J1421.1+3859_daily_bin1814.fits evtable="EVENTS" outfile="/lscratch/kocevski/18910096/ft1_filtered_4FGL_J1421.1+3859_daily_bin1814.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.44
user 0.18
sys 0.16

Number of photons that the gtmktime cut: 820

Generating the livetime cube:
time -p gtltcube evfile="/lscratch/kocevski/18910096/ft1_filtered_4FGL_J1421.1+3859_daily_bin1814.fits" evtable="EVENTS" scfile=/lscratch/kocevski/18910096/ft2_4FGL_J1421.1+3859_daily_bin1814.fits sctable="SC_DATA" outfile=/lscratch/kocevski/18910096/ltcube_709516801_709776001_4FGL_J1421.1+3859_daily_bin1814.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/18910096/ft2_4FGL_J1421.1+3859_daily_bin1814.fits
.....................!
real 9.35
user 8.98
sys 0.23

Generating the exposure map:
time -p gtexpmap evfile=/lscratch/kocevski/18910096/ft1_filtered_4FGL_J1421.1+3859_daily_bin1814.fits evtable="EVENTS" scfile=/lscratch/kocevski/18910096/ft2_4FGL_J1421.1+3859_daily_bin1814.fits sctable="SC_DATA" expcube=/lscratch/kocevski/18910096/ltcube_709516801_709776001_4FGL_J1421.1+3859_daily_bin1814.fits outfile=/lscratch/kocevski/18910096/expmap_709516801_709776001_4FGL_J1421.1+3859_daily_bin1814.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/18910096/ltcube_709516801_709776001_4FGL_J1421.1+3859_daily_bin1814.fits
.....................!
real 59.96
user 56.27
sys 3.35

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
Added 181 point sources and 0 extended sources

Setting source of interest to:
4FGL J1421.1+3859 @ 215.292 38.9966

Creating the counts map:
time -p gtbin evfile=/lscratch/kocevski/18910096/ft1_filtered_4FGL_J1421.1+3859_daily_bin1814.fits scfile=/lscratch/kocevski/18910096/ft2_4FGL_J1421.1+3859_daily_bin1814.fits outfile=/lscratch/kocevski/18910096/cmap_709516801_709776001_4FGL_J1421.1+3859_daily_bin1814.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=215.292 yref=38.9966 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.35
user 0.20
sys 0.14

Creating the high resolution counts map:
time -p gtbin evfile=/lscratch/kocevski/18910096/ft1_filtered_4FGL_J1421.1+3859_daily_bin1814.fits scfile=/lscratch/kocevski/18910096/ft2_4FGL_J1421.1+3859_daily_bin1814.fits outfile=/lscratch/kocevski/18910096/cmap_HighResolution_709516801_709776001_4FGL_J1421.1+3859_daily_bin1814.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=215.292 yref=38.9966 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.35
user 0.19
sys 0.13

Computing the diffuse response:
time -p gtdiffrsp evfile=/lscratch/kocevski/18910096/ft1_filtered_4FGL_J1421.1+3859_daily_bin1814.fits evtable="EVENTS" scfile=/lscratch/kocevski/18910096/ft2_4FGL_J1421.1+3859_daily_bin1814.fits sctable="SC_DATA" srcmdl=/lscratch/kocevski/18910096/Model_4FGL_J1421.1+3859_daily_bin1814.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 GAL_V02
Working on...
/lscratch/kocevski/18910096/ft1_filtered_4FGL_J1421.1+3859_daily_bin1814.fits....................!
real 23.30
user 22.25
sys 0.92

Creating the likelihood object...
obs = UnbinnedObs('/lscratch/kocevski/18910096/ft1_filtered_4FGL_J1421.1+3859_daily_bin1814.fits', '/lscratch/kocevski/18910096/ft2_4FGL_J1421.1+3859_daily_bin1814.fits', expMap='/lscratch/kocevski/18910096/expmap_709516801_709776001_4FGL_J1421.1+3859_daily_bin1814.fits', expCube='/lscratch/kocevski/18910096/ltcube_709516801_709776001_4FGL_J1421.1+3859_daily_bin1814.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/lscratch/kocevski/18910096/Model_4FGL_J1421.1+3859_daily_bin1814.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J1421.1+3859'

4FGL J1421.1+3859
   Spectrum: PowerLaw
291    Prefactor:  1.965e+00  0.000e+00  0.000e+00  1.000e+06 ( 1.000e-13)
292        Index:  2.670e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
293        Scale:  9.266e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /lscratch/kocevski/18910096/ft1_filtered_4FGL_J1421.1+3859_daily_bin1814.fits
Spacecraft file(s): /lscratch/kocevski/18910096/ft2_4FGL_J1421.1+3859_daily_bin1814.fits
Exposure map: /lscratch/kocevski/18910096/expmap_709516801_709776001_4FGL_J1421.1+3859_daily_bin1814.fits
Exposure cube: /lscratch/kocevski/18910096/ltcube_709516801_709776001_4FGL_J1421.1+3859_daily_bin1814.fits
IRFs: P8R3_SOURCE_V2
Source model file: /lscratch/kocevski/18910096/Model_4FGL_J1421.1+3859_daily_bin1814.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) = 9141.3339273

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .85173E-04   1.0000          .0000       .10000E+07
     2 'norm      '    .33307E-09   1.0000          .0000       .10000E+07
     3 'Prefactor '    .32859E-03   1.0000          .0000       .10000E+07
     4 'norm      '    20.527       1.0000          .0000       .10000E+07
     5 'Prefactor '    .25787E-02   1.0000          .0000       .10000E+07
     6 'Prefactor '    2.7593       1.0000          .0000       .10000E+07
     7 'Prefactor '    .32995E-03   1.0000          .0000       .10000E+07
     8 'norm      '    4.7425       1.0000          .0000       .10000E+07
     9 'Prefactor '    .48543E-04   1.0000          .0000       .10000E+07
    10 'Prefactor '    .21989E-02   1.0000          .0000       .10000E+07
    11 'Prefactor '    .52576E-01   1.0000          .0000       .10000E+07
    12 'norm      '    .15444E-03   1.0000          .0000       .10000E+07
    13 'norm      '    .29621E-06   1.0000          .0000       .10000E+07
    14 'Prefactor '    10.351       1.0000          .0000       .10000E+07
    15 'Prefactor '    69.271       1.0000          .0000       .10000E+07
    16 'norm      '    .99078       1.0000          .0000       .10000E+07
    17 'Prefactor '    4.9987       1.0000          .0000       .10000E+07
    18 'Prefactor '    9.8834       1.0000          .0000       .10000E+07
    19 'Prefactor '    .51757E-04   1.0000          .0000       .10000E+07
    20 'norm      '    .90549       1.0000          .0000       .10000E+07
    21 'norm      '    3.2751       1.0000          .0000       .10000E+07
    22 'Prefactor '    7.2379       1.0000          .0000       .10000E+07
    23 'Prefactor '    .10610E-03   1.0000          .0000       .10000E+07
    24 'Prefactor '    .27523E-03   1.0000          .0000       .10000E+07
    25 'Normalizat'    .99611       1.0000         .10000E-01   10.000    
    26 'Prefactor '    1.1532       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5840E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   9141.319     FROM MIGRAD    STATUS=CONVERGED    180 CALLS     2274 TOTAL
                     EDM=   .36E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  1.5%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .69289E-06    100.84       -.47788E-05** at limit **
   2  norm           .0000        .26242       -.89529E-07** at limit **
   3  Prefactor      .0000        2.3420       -.49021E-06** at limit **
   4  norm          20.499        8.0338        .45424E-06   -.46884E-01
   5  Prefactor      .0000        11.102        .32498E-06** at limit **
   6  Prefactor     2.7451        3.2039       -.22378E-06   -.36486E-03
   7  Prefactor     .22204E-09    15.527        .11477E-05** at limit **
   8  norm          4.7425        3.2832       -.14197E-06   -.38905E-04
   9  Prefactor      .0000        2.6538        .37757E-06** at limit **
  10  Prefactor      .0000        5.4292        .11187E-05** at limit **
  11  Prefactor     .44203E-01    28.797       -.21687E-05** at limit **
  12  norm           .0000        2.9708       -.48619E-06** at limit **
  13  norm           .0000        3.7445       -.19592E-06** at limit **
  14  Prefactor     10.342        7.0231       -.49830E-06   -.47351E-01
  15  Prefactor     69.454        6.5683       -.21477E-07   -.14759    
  16  norm          .98574        .77684        .15584E-06    .59864E-02
  17  Prefactor     4.9758        3.9237        .46180E-06   -.33045E-02
  18  Prefactor     9.8878        6.2002        .16378E-06   -.88490E-03
  19  Prefactor      .0000        1.5983        .96428E-07** at limit **
  20  norm          .90542        .91229        .20908E-06    .69888E-04
  21  norm          3.2740        3.1102       -.10650E-06    .28883E-03
  22  Prefactor     7.2317        7.5380       -.87870E-07   -.34238E-02
  23  Prefactor     .66269E-06    80.547       -.27655E-05** at limit **
  24  Prefactor     .22204E-09    13.007       -.99825E-06** at limit **
  25  Normalizat    .99616        .16489        .11810E-05    .61873E-04
  26  Prefactor     1.1532        .19345        .35278E-05    .40854E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 6.9289e-07
  norm       = 0
  Prefactor  = 0
  norm       = 20.4993
  Prefactor  = 0
  Prefactor  = 2.74512
  Prefactor  = 2.22045e-10
  norm       = 4.7425
  Prefactor  = 0
  Prefactor  = 0
  Prefactor  = 0.0442029
  norm       = 0
  norm       = 0
  Prefactor  = 10.3424
  Prefactor  = 69.4536
  norm       = 0.985735
  Prefactor  = 4.97583
  Prefactor  = 9.88781
  Prefactor  = 0
  norm       = 0.905422
  norm       = 3.27404
  Prefactor  = 7.23175
  Prefactor  = 6.62692e-07
  Prefactor  = 2.22045e-10
  Normalizat = 0.996161
  Prefactor  = 1.15319
 **********
 **   18 **HESSE 
 **********

 FCN=   9141.319     FROM HESSE     STATUS=OK           514 CALLS     2788 TOTAL
                     EDM=   .43E-06    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .69289E-06    102.47        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  norm           .0000        .26126        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor      .0000        2.3143        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  norm          20.499        11.714        .22078E-03   -1.5617    
   5  Prefactor      .0000        11.118        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     2.7451        3.2067        .61250E-03   -1.5675    
   7  Prefactor     .22204E-09    15.527        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          4.7425        3.2927        .46180E-03   -1.5664    
   9  Prefactor      .0000        2.6586        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor      .0000        5.4323        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     .44203E-01    1.1697        .64948E-02   -1.5704    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  norm           .0000        2.9713        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm           .0000        3.7358        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     10.342        11.025        .31119E-03   -1.5644    
  15  Prefactor     69.454        33.961        .12016E-03   -1.5541    
  16  norm          .98574        8.6653        .43439E-03   -1.5688    
  17  Prefactor     4.9758        12.029        .44955E-03   -1.5663    
  18  Prefactor     9.8878        6.3476        .31850E-03   -1.5645    
  19  Prefactor      .0000        1.6002        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  norm          .90542        .91587        .45382E-03   -1.5689    
  21  norm          3.2740        3.1231        .55929E-03   -1.5672    
  22  Prefactor     7.2317        7.5810        .37260E-03   -1.5654    
  23  Prefactor     .66269E-06    81.948        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  Prefactor     .22204E-09    13.000        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  25  Normalizat    .99616        .13929        .46118E-01   -.93159    
  26  Prefactor     1.1532        .16186        .59736E-01   -.87784    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 4.26651e-07
Minuit parameter uncertainties:
  1  0.0168524
  2  2.46557e-07
  3  2.24407e-07
  4  11.7139
  5  3.19525e-05
  6  3.2067
  7  0.000116469
  8  3.2927
  9  1.03572e-06
  10  1.51673e-05
  11  0.454778
  12  5.32968e-06
  13  7.49415e-06
  14  11.0248
  15  33.9614
  16  5.84524
  17  12.0291
  18  6.34764
  19  3.42028e-06
  20  0.915866
  21  3.12307
  22  7.58103
  23  0.0147388
  24  0.000102898
  25  0.139338
  26  0.161927
Done.

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

Extracting fit parameters...

4FGL J1421.1+3859
   Spectrum: PowerLaw
291    Prefactor:  0.000e+00  1.517e-05  0.000e+00  1.000e+06 ( 1.000e-13)
292        Index:  2.670e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
293        Scale:  9.266e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
581    Prefactor:  1.153e+00  1.619e-01  0.000e+00  1.000e+01 ( 1.000e+00)
582        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
583        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
580   Normalization:  9.962e-01  1.393e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 0.00
Ra Dec: 215.292 38.997
Photon Flux Upper Limit: 4.88463218458e-08 ph cm-2 s-1
Energy Flux Upper Limit: 0.0038386544838 MeV cm-2 s-1

Saving results to:
/lscratch/kocevski/18910096/likelihoodResults_709516801_709776001_4FGL_J1421.1+3859_daily_bin1814.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): 102
logL (Free Index) = 9141.32478549
delta logL = -0.00585109422536

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 9141.31893479
delta logL = -3.95013557863e-07

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .31533E-05   1.0000          .0000       .10000E+07
     2 'Index     '    2.8326       1.0000          .0000       10.000    
     3 'Normalizat'    .99617       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.1532       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5840E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   9141.319     FROM MIGRAD    STATUS=CONVERGED     71 CALLS      253 TOTAL
                     EDM=   .87E-12    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .55511E-10    .22656        .42118E-03** at limit **
   2  Index         1.3901        7.4895        .50000       -.36380E-10
   3  Normalizat    .99616        .68068E-03    .46119E-01    .26055E-03
   4  Prefactor     1.1532        .80414E-03    .59736E-01    .26730E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 5.55112e-11
  Index      = 1.39008
  Normalizat = 0.996161
  Prefactor  = 1.15319
 **********
 **   18 **HESSE 
 **********

 FCN=   9141.319     FROM HESSE     STATUS=NOT POSDEF    27 CALLS      280 TOTAL
                     EDM=   .44E-11    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .55511E-10    1.1346        .84235E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         1.3901        9.1864        .50000       -.80667    
   3  Normalizat    .99616        .15221E-02    .23970E-03   -.93159    
   4  Prefactor     1.1532        .17977E-02    .26418E-03   -.87784    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 4.35678e-12
Minuit parameter uncertainties:
  1  1.66053e-05
  2  59573.8
  3  0.00152213
  4  0.00179768
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) = 9141.3189344
delta logL = -2.91038304567e-11

Extracting fit parameters...

4FGL J1421.1+3859
   Spectrum: PowerLaw
291    Prefactor:  5.551e-11  1.661e-05  0.000e+00  1.000e+06 ( 1.000e-13)
292        Index:  1.390e+00  5.957e+04  0.000e+00  1.000e+01 (-1.000e+00)
293        Scale:  9.266e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
581    Prefactor:  1.153e+00  1.798e-03  0.000e+00  1.000e+01 ( 1.000e+00)
582        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
583        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
580   Normalization:  9.962e-01  1.522e-03  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 0.00
Ra Dec: 215.292 38.997

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/18910096/cmap_HighResolution_709516801_709776001_4FGL_J1421.1+3859_daily_bin1814.png

Cleaning up...

** Nuclear option initiated! **

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='3.84e-03', job_status='DONE', photon_flux_upper_limit='4.88e-08', time_completed='2023-07-10 12:36:27.403197', job_id='18910096', GAL2='1.15', fit_tolerance='1e-08', EG2='1.00', EG='1.00', time_epoch_completed='1689017787.4', return_code2='102', ts='0.00', comment='SUCCESS', return_code='0', GAL='1.15', dlogl='-2.91e-11', ts2='-0.00', photon_index_error='0.00', photon_index='2.67' WHERE bin_id='1814' AND source_name='4FGL J1421.1+3859' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Mon Jul 10 12:36:27 PDT 2023

