text:
KP, AD And The Insane NBA Trade Deadline
On February 8, 2019 By Hunter Hippel
This column has been in the works for about a week. It's long, but covers every major trade made over the past seven days and touches on some of the minor ones as well.
Late thoughts on the Kristaps Porzingis trade…
It's going to be really funny when the Knicks sign Kemba Walker and only Kemba Walker this Summer, completely negating the whole point of this terrible, terrible trade.
Lets start from the beginning. Last Thursday morning, in the middle of all the other NBA chaos that was happening, ESPN's Adrian Wojnanowski dropped another bomb that Kristaps Porzingis met with the team, displaying that he was unhappy and concerned about its direction, leaving the Knicks to believe that he wanted a trade. About 35 minutes later, Porzingis was a Dallas Maverick.
Thank God, Woj was late to the trade discussions New York was having about Porzingis with other teams (Or at least we hope so). Reports later came out that the Knicks had been discussing moving Porzingis in the days prior to the trade.
This was a surprise and not so much one at the same time. It was a surprise because you would have thought that Porzingis would be part of whatever big plans the Knicks had going for them this Summer, and you would have thought that Porzingis would've wanted to be a part of that.
But it wasn't a surprise because Porzingis and the Knicks have clear, documented beef. Whether it be Phil Jackson's riff or the skipped exit interview or the fact that New York almost traded him once before, Porzingis and the Knicks never really got along. The fact that New York was holding him out of basketball activities for this season even though he was probably ready to go after sustaining that torn ACL last season didn't help their relationship either (Though that was a smart move by the Knicks, and Dallas is following suit). Porzingis was probably going to walk next Summer, assuming he took the qualifying offer from the Knicks this Summer (Hopping into restricted free agency wouldn't have given him the full power to leave).
The Porzingis situation serves as a warning to the rest of the league: Do Not Go To The Knicks. All you had to do was look at how they treated Porzingis, their 2nd biggest star since Patrick Ewing.
It felt like NBA players had figured out that going to the Knicks was a suicide mission. They got ignored by LeBron twice and never got KD's consideration in 2016. Their biggest signing in the past five years was Joakim Noah, which worked out wonderfully. The Knicks had become a complete stay-away when it came to free agent destinations.
Which is why this renewed, supposed interest in joining them from two of the league's ten best players is so strange. Why would Kevin Durant and Kyrie Irving want to go there? KD left Oklahoma City not only because of Russell Westbrook, but because the Thunder were incompetently managed from the top down. Kyrie wanted out of Cleveland not only because LeBron was limiting him from what he's doing now, but because there was no way that team was winning another title again, and because Kyrie had never played for a good coach.
Maybe they want to play in New York City, the place that runs the world. Maybe they want to bring the Knicks their first championship in 46 years in the most famous arena in the world in the city that runs the world. Maybe KD and Kyrie just want to play together, and while Boston would make a ton of sense fit-wise, maybe they want to do it on that grandest stage. Maybe KD wants to take on more of a LeBron-like role, where we see him as a more do-it-all, ball-handler type player. Maybe Kyrie thinks the ceiling on this current Celtics team is a lot lower than we think it is, and that playing in Boston isn't as fun as he thought it was.
I'm so pro player empowerment that I even supported Jimmy Butler's antics earlier this season. But I also care about championships, and I like players that want to win. While Kyrie and KD would make a new threat in the East, it seems unlikely that team is a better one than each of their current ones. Is Kyrie-DSJ-Knox-KD-Robinson better than Kyrie-Hayward-Tatum-Morris-Horford? What about a team that features Kyrie-Tatum-Anthony Davis? Kyrie, Davis and whatever the Celtics have left after a potential trade with New Orleans probably isn't better than that potential Knicks team, especially considering that New York could have a juicy draft pick coming their way. Given that Tatum is probably going to New Orleans in a Davis trade, it's fair to see Kyrie's point.
But for KD, does anything trump what he has right now? DeMarcus Cousins doesn't make a difference; he's going to leave and the Warriors will be just as good without him. For KD, this is simply about not getting bored, and trying to expand his game. Again, it's a fair point to see.
But why there… just why the Knicks
Maybe Kyrie and KD feel like their starpower can overshadow any disfunction going on within the organization. But there's on the court problems too. If KD wants to expand his game to a LeBron-like role, that affects Kyrie negatively, putting him in a similar role to the one he was in Cleveland. And if you know Kyrie is coming, why was Dennis Smith Jr., a spark-plug, traits of bad Russell Westbrook (high usage rate, ballhog, non-off-the-ball player) guard the main piece of a blockbuster trade which sent your best player in years out the door? I understand the salary relief, but if you have the capability to sign both Kyrie and KD, not only are you going to go over the cap to do that, but you're going to go as far as it takes to get that team to be as good as it can. You'll pack MSG every night and be fine. That includes keeping and paying Porzingis. That means paying whatever that luxury tax bill is. Because that team will be worth it.
Porzingis makes any team better. Make him happy and put pieces around him, or, if you have the capability, have him be a piece around someone else. The Knicks failed to do both of those things, and ended up trading him for two average-to-below-average first round picks and the hope that someone is coming. That hope is based on two of the league's ten best players leaving their already really, really good situations to come to a complete mess of an organization with serious on-court problems despite their young talent (I can't imagine DSJ playing with anyone who is "supposedly" coming to the Knicks).
If Kyrie and KD were smart, they don't go to the Knicks. And if the Knicks were smart, they don't make this trade. How this move truly works out is based on one of those two sentences becoming true.
For Dallas, I mean, what an absolute steal. The Mavericks essentially traded two first round picks for Kristaps freaking Porzingis, Courtney Lee, who is viable as a 5th guy for now but is a spot that could definitely be upgraded, and Tim Hardaway Jr., who 18 months ago probably gets "One of the worst contracts in the league" as a noun rather than his name. While Hardaway Jr. isn't the most efficient scorer, he has improved on that end over the past year, and this Mavericks team is one that just needs firepower around Luka Doncic to become a true threat in the playoffs. Hardaway Jr. helps with that, and while the contract is still overinflated for his new self, you still have Luka and Porzingis. I'll take on close to anything if I have that (Except for Andrew Wiggins. Definitely except Andrew Wiggins).
On the way out went a guard that the Mavericks were claiming they weren't shopping and wanted around still, but definitely were shopping and didn't want around due to his on-court fit with Doncic in DSJ and two expiring contracts that never worked out for Dallas but were too large to bench (Wes Matthews and DeAndre Jordan). I mean, they cleared out everything that was wrong with their roster and got one of the best young big men in the league for the cost of two future first round picks. The management that allowed the Mavericks to do this is who Kyrie and KD want to play for? Good luck.
The Mavericks owe a lot of future picks now with this trade, and it's risky if they fail to fill out the rest of this roster through other methods. But having Doncic and Porzingis gets you to a certain ceiling, which means the picks you are giving away aren't going to be very good in the first place. And the duo of Doncic and Porzingis should attract talent. These two guys have the ability to both be top 15 players; Doncic's ceiling is legitimately one of the best players in the league. Doncic is a de-facto point guard/crunch-time guy and Porzingis is the perfect big man for today's league; he stretches the floor, protects the rim and is secretly athletic rather than lanky. Porzingis' health is a concern, but if Dallas fills out the roster, then his role can strictly be what he's good at, rather than taking on a heavy load.
The pick going to the Hawks is probably going to be a good one; Dallas has all the incentive to go for a playoff spot for that reason and to get Luka some experience, despite their relinquishment of Harrison Barnes (More on that later).
If they didn't owe Atlanta the pick, I would advocate for Dallas to tank the rest of this season, because again, it's not like you're going anywhere this season anyways without Porzingis.
Dallas heads into next season with Luka-Hardaway Jr.-Porzingis. That's pretty good. They need two other guys (The plan to address that sounds like a couple Summer signings) as the Barnes trade got rid of another starter. Courtney Lee is under contract for next season, and could serve as a wing opposite Hardaway Jr.
With this trade, the Mavs are at least fun as hell next year, with the potential to be a lot better. That might be understating it.
On the Anthony Davis situation, and the Pelicans kicking off a fire-sale…
The Anthony Davis trade request came as no surprise, but the way Davis and Rich Paul handled this was pretty crappy, and it might end up backfiring on them.
Davis claimed that there were four teams on his list: The Los Angeles Lakers, the Milwaukee Bucks, the LA Clippers, and the New York Knicks.
But Davis and Paul knew that the only way Davis would be a Laker next season (Which is clearly his (And Paul's and LeBron's) preferred destination) would be to get him moved before the trade deadline, because then the Boston Celtics would be eligible to bid for Davis if LA had waited until July 1st.
The Celtics are out-bidding everyone no matter what. New Orleans knew this. Davis and Paul knew this. The Lakers, for whatever reason, didn't.
The Lakers first offer of Lonzo Ball, Kyle Kuzma, Rajon Rondo, Michael Beasley and a first-round pick was incredibly hysterical. It was actually bad business by New Orleans that they continued to talk with them.
LA ended up getting more serious, offering all five of their young players (Ball, Kuzma, Brandon Ingram, Josh Hart and Ivica Zubac) and two first round picks in exchange for Davis and Solomon Hill. That was actually quite realistic and fair.
The Lakers (and their fans) thought otherwise, and failed to realize there was no offer they could have put out there that is better than what Boston can offer July 1st. Reports have the Celtics willing to put Jayson Tatum in a potential trade along with other pieces. In Tatum, you're getting a future All-NBA player with the potential to be one of the league's ten best, plus a nice stash of draft picks and your choice of other role players. That's incomparable to what the Lakers have. LA's package contained late first round draft picks and potentially zero All-NBA guys/future stars. While I like Hart a lot, his ceiling is a solid wing on a good team who can fill multiple roles. Zubac felt like a Jursurf Nurkic without the passing ability; someone who will learn defense while consistently putting up 20-10s (There's a legitimate chance he's the best out of all the young guys LA had. Of course they ship him out of all of them across the hallway for nothing. Congrats to the Clippers on another AD asset!). I'm afraid Lonzo Ball has already reached his ceiling; a good passer who is going to be an iffy shooter, limiting his effectiveness to take over late in games. Kyle Kuzma could be anywhere from the best to third best player in their offer; the guy knows how to get buckets, and has a ceiling of a crunch-time scorer, but the efficiency has to improve. Some nights he's on and some nights he's off. There's a chance he's Andrew Wiggins 2.0 offensively. And we've been praising Brandon Ingram for three years now. Can anyone tell me what he does well on the court?
The trade would have made sense for New Orleans because they'd be getting a young core, but from what we've seen so far this season, and there's been a much bigger sample size than what we thought we were going to get, it's not exactly confirmed that this core works. Individually, the projections are pretty good. But you can't look at it that way. The Pelicans would have been getting all these guys, and they would have been the future. They'd have to fit and work together. It's certainly taken them awhile to do so in Los Angeles.
In Tatum you're getting a guarantee, and that's why New Orleans was smart to wait. The Lakers offer I floated that should have gotten New Orleans to consider not making the Boston deal was all five young dudes and three firsts.
The Lakers offered just short of that before "pulling out" of talks with the Pelicans, claiming their demands were "outrageous." While the Pelicans and Lakers were *this* close to coming to a fair agreement, New Orleans did a good job not being nice here. They should be "outrageous." In Davis, we're talking about one of the five best players in the league and possibly one of the best 45 players of all-time. Davis is 25 and is already at that point. He's has 5-6 years left of his prime, and that's worst-case scenario.
So blame the Pelicans for not taking the Lakers "final" offer all you want, but the first round picks are making up for what those young guys probably aren't going to amount to. Three makes it worth it, two does not. For almost any other player, it'd be a silly argument to end discussions over. For Davis, it wasn't at all.
The Lakers' and Celtics' offers were the only ones New Orleans should have been discussing. Other teams were putting their hands in the hat or should have been (Toronto, Portland, Miami, the Clippers), but only one of those teams gave the Pelicans a package that made sense. While a hypothetical Damian Lillard and Zach Collins package is equal value for Davis, that would have turned the Pelicans into a little bit better than what they are now. The ceiling on a Lillard-led Pelicans team would have been the 4th seed, not a Finals team.
The Pelicans have to get a rebuilding package out of this trade, not a win-now package headlined by another top 25 player. You're putting a second round ceiling on your team if you make that trade as opposed to getting a core of guys that could develop into something very, very good.
You need a star back for Davis, but that needs to be a future star rather than a current one. That's the difference between Tatum and Lillard. Or between Shai Gilgeous-Alexander and Kyle Lowry.
The four teams I mentioned above didn't have the package New Orleans should have wanted for Davis, and it was smart of New Orleans not to consider them. For once, the Pelicans handled something right. Yesterday's moves proved that as well.
The Bucks only made one move, but it was enough to counter the big plays made by others atop the East. Milwaukee's trade for Nikola Mirotic gives the Bucks another guy they can plant in the corner and get open shots for. Some speculate he could be out there in crunch-time for them (He's a player worthy of that), but that means benching Brook Lopez, who provides valuable defense to the Bucks and allows Giannis Antetokounmpo to not have to do too much on both ends. If Lopez is out, Giannis is the de-facto rim protector, and the initiator offensively. Giannis is a tank, but that's a lot to ask of him.
New Orleans began their fire-sale with this move. Just a year after acquiring Mirotic to help make a playoff run, they're selling him to another hoping to make it deep. This fire-sale is a elongated one, as AD (And possibly Jrue Holiday) won't be moved till July, but Mirotic was the first domino to fall in what looks like a total rebuild for New Orleans.
They got back quite a bit; something necessary for a rebuilding team. After the Bucks stole Stanley Johnson from the Pistons for Thon Maker, the Bucks flipped Johnson into Mirotic (An excellent move. Johnson is a development piece. Mirotic comes in right now and plays big minutes in the playoffs), and sent Johnson to New Orleans. Johnson's been up and down throughout his career, and just hasn't figured out the offensive side of the ball. It's possible Alvin Gentry's system could help. He's an excellent defender already, and still projects as a switchy wing. He's a good get and bet for the Pelicans.
Somehow, they netted four second round picks (And Jason Smith's contract) in addition to Johnson. Milwaukee had a ton of extra ones hanging around, and decided to ship them all to the Pelicans. This says one of two things: 1) New Orleans wanted to revamp after the forthcoming Davis trade, keep Mirotic and try and stay competitive or (Explaining the high price) or 2) Demanded some crazily unprotected first rounder for him. The 2nd option is more likely based on what we know about the Pelicans trade demands for AD, which is a good thing, because the first would have me concerned.
All-in-all, that's a win-win trade. For Milwaukee, it could go a long ways.
The Pelicans made one other move that wasn't AD, and that was swapping Wesley Johnson for a 2nd rounder and Markieff Morris. Morris is going to get bought out, so it's essentially a way to get rid of Johnson, while for Washington, they get under the tax by dealing Morris. Morris is an interesting buyout guy, but his breed is dying. If he can't make the adjustments his brother has, his options might start to become limited.
On the Tobias Harris trade and the Clippers' and Sixers' deadlines…
This trade was an unbelievable late night surprise Tuesday that I was lucky (or not.. it was 1:30 AM) to be up for. The Clippers shipped Harris, Boban Marjanovic and Mike Scott to the Philadelphia 76ers for Landry Shamet, Wilson Chandler, Mike Muscala, their own first rounder next season, Miami's 2021 unprotected first rounder and two second rounders.
There's many dynamics to this one. First, the Sixers essentially made a trade that rid them of all the depth they had previously been complaining about not having enough of and didn't fix their biggest issue. Second, the Clippers, like the Knicks, have to know someone is coming by letting Harris leave early. The fact that they made no push in trying to re-sign him is telling.
Let's start with the Sixers. If you base it off win-loss, the Jimmy Butler trade was worked out fine, and in just the way we planned it too. But underlying issues have complicated its effectiveness, and has even led me to question whether it was the right move.
Butler's little spat with Brett Brown not long after arriving in Philly and the Sixers' loss to the Celtics on Christmas Day spotlighted these issues. Butler wants the offense to run through him, with pick-and-rolls and isolations a heavy part of it. That would be fine if Ben Simmons was a shooting threat from the outside. He is not, and probably never will be given the reluctancy we've seen from him in that area of his game.
With Simmons a non-threat, defenses can leave him alone in the corner if the Sixers are isolating Butler or posting up Embiid. This has led to essentially 4-on-5 play from the Sixers in crunch-time, and it's cost them.
While it hasn't been that huge of an issue in the regular season, come the playoffs it will be. You have to execute down the stretch in the playoff games. It's the No.1 deciding factor in who gets to the Finals.
Philly's best option to solve that would have been trading Simmons for Anthony Davis, an offer that would have made sense for New Orleans and could probably be done straight up. Instead of considering this, the Sixers went all in on complicating matters even further, and risk losing one or both of their two big acquisitions this season come Summer if it doesn't work out.
Trading for Harris adds another high-usage, high volume scorer to the mix. While Harris is a more efficient player than I have previously given him credit for, you still have to wonder about the fit. He'll have to sacrifice on this team. That's a big adjustment compared to his role on the Clippers, where he was averaging 20.9 points a game and had a usage percentage of 23.6 percent.
And Harris wasn't what they needed. Philly needed two things this deadline: 1) A solution to the Simmons/Butler fit (A ball-handling guard or a trade of one of those two). 2) Depth.
They got neither. While the Sixers did remake their bench, it's not really a unit; and they have one facilitator who's comfortable playing off the ball (TJ McConnell) and just a bunch of other dudes.
When you have a starting five that is as talented as their's though, you can stagger guys pretty easily. Every player can have the offense run through them in some capacity. Together though is the question.
The Harris trade seemed unnecessary because Wilson Chandler was doing fine as the 5th guy in the Sixers starting lineup (He'd shot 39% from three this year, and was extremely effective playing off the ball) and because it sacrificed them of already limited depth. Landry Shamet had been fantastic this season, and provided some of that guard-play Philly coveted and was shooting the lights out of the ball (40.4 percent from three!). Muscala was a productive big off the bench as well.
But the Sixers did get Boban Marjanovic back, who's been one of the best big bench guys in the league this season. He'll bring a bigger defensive presence than someone like Muscala, but can't stretch the floor like him and Embiid can. Mike Scott fits more of Muscala's role, but who knows what you'll get from him.
They also traded for James Ennis from Houston, who never fit in there but gives Philly more size off the bench. He's essentially Harris' backup at the four.
Jonathan Simmons also came in from Orlando, in what was probably the most underrated/not-talked-about trade of the deadline. Philly traded Markelle Fultz, the No.1 overall pick not even two years ago, and no one talked about it. Perhaps it's because Fultz played in just 33 games for the 76ers, or because the projected star has completely disappeared off the radar this season. No one really knows anything, and no one really knows how to evaluate it.
For Philly, they're in a different place now. While they could use Fultz to be a facilitator/crunch-time scorer, the Butler trade earlier this season signified that the 76ers were probably planning on a future without him. He was never going to be the guy they hoped for.
For Orlando, it gives some hope to a franchise that hasn't had a point guard in 10 years. If Fultz can become anything we projected him as, that's a win. It's worth the gamble of the 1st and 2nd round pick given up (The first was an extra one Orlando had from OKC, not their own). Orlando should be able to give Fultz the car keys. In Philly, that wasn't the case. Orlando allowing him to run the show will show us what, if anything, he's really capable of.
Like Ennis, Simmons is a body off the bench. He hasn't done a lot for Orlando this year, but provides defense and a veteran presence on the court. He really was a throw-in when it came to this trade.
Still, none of this makes up for the fact that the Sixers gave up valuable bench pieces and an insane amount of draft capital for a guy they didn't need. The picks might have been the most shocking part of the whole trade; Philly gave up the 2021 Miami unprotected first rounder (One of the most valued assets in the league) in addition to their own first next year and TWO second rounders. You only give up that much if you're going to be winning titles. The Sixers can't guarantee that.
Plus, you help the Clippers get in position for a possible Anthony Davis trade, which is far more possible and seems much more likely after this deadline.
This trade clearly symbolizes that the Clippers know things about this Summer. In any other scenario, LA is dying to re-sign Harris and elevate the core that made them fun this season to one that can contend. They did the exact opposite of that, clearing as much cap room as possible and fire-saling almost everyone, leading to a bevy of picks and a ton of cap room that makes them real players for the likes of Kawhi Leonard and Anthony Davis.
The Clippers have to know Kawhi is coming. Even though they got more than you could ask for, you don't just let Harris go like that. And you don't get back the assets you did if you're not making a play for someone. It would make no sense for the Clippers to rebuild; the team they employed for the first third of the season was too close to being good. It's one of those "We'll see when we get there" things, but a Clippers package featuring SGA, Jerome Robinson, Landry Shamet, Ivica Zubac, their own first round pick this Draft and the two firsts acquired from Philly makes a case to rival Boston's offer.
The Avery Bradley trade was another sign. Bradley's not the same guy anymore, but you don't just send him to Memphis for expiring contracts; a contender would have loved to give up value for Bradley to at least play defense for them. That trade was a gift for the Grizzlies, who get another defensive-minded player who can switch in Bradley.
On the Raptors' and Grizzlies' deadlines…
Overall I was fine with what the Raptors did. I was initially against them doing anything at all, as I believed firmly in the "Don't fix it if it isn't broke" philosophy (Their name coming up in Davis talks was odd to me), and because I thought that they could win the title with the roster they had pre-deadline.
Adding just Gasol was fine. Jonas Valancuinas' role had been limited due to injuries and the rise of Pascal Siakam and Serge Ibaka, and Gasol isn't able to play big minutes anyways. Gasol essentially becomes Valancuinas' minutes. Now they're just more efficient minutes. I would expect Gasol to come off the bench, as he's shown a bit of rust this season and isn't the Marc Gasol we've been used to the past eight years. The crunch-time pair of Pascal Siakam and Serge Ibaka has been too good this year.
In terms of value, Toronto sacrificed some depth, but overall got a steal. That doesn't mean it was unfair for Memphis though. While they probably would have liked to get a bit more for their all-time franchise guy, the haul from Toronto was good. Delon Wright will get big minutes, and figures to be their starter heading into next season, as it would only make sense for Mike Conley to be traded after the moves made Thursday. CJ Miles is incredibly underrated; he was fantastic for Toronto until Danny Green showed up. The Grizz had to eat Valancuinas, but he at least fits their grind style, and there's only one more year left on his deal. The 2nd round adds value as well. The Grizzlies also got Tyler Dorsey from Atlanta for essentially free (Shelvin Mack was waived by the Hawks), a young player who still projects as a scorer off the bench.
Toronto also shipped out Greg Monroe and had to pay a 2nd round pick to Brooklyn to do it. Monroe was the minutes replacement for the injured Valancuinas, and played pretty well in that spot, but Gasol is just better and more efficient.
Charlotte's interest in Gasol never made a lot of sense. There's been recent reports that Walker is probably staying in Charlotte, which made their interest a little more reasonable, and Gasol would have been upgrade over Bismarck Biyombo and Cody Zeller at the 5, but Charlotte isn't exactly a team that should be buying when they already have a bevy of bad contracts. They could have sent a pick along with one of those contacts to make the deal better, but how would Gasol of been part of your future core that you're trying to build?
Interest in Mike Conley around the league was plentiful, and it should have been. Memphis didn't end up moving him, which has to be disappointing for both, but his time will probably come in July or at the Draft. Utah and Detroit seemed to be the front-runners; Detroit's interest never made any sense.
Utah and Memphis discussed two different deals – one that included Ricky Rubio, Derrick Favors and a 1st round pick and another that included a 1st and 2nd rounder and a contract to match Conley's. The first one made more sense. Rubio almost certainly had to go out if Conley went in. His three-point shooting has improved, but it still sits at a measly 32.5 percent. Rubio, unlike Conley, needs the ball to be effective, and on that Utah team which desperately needed firepower (Which Conley would have supplied), you couldn't afford to have non-shooters on the floor. Rubio-Conley-Donavan Mitchell would have been ridiculous defensively, but they would have lacked switchability playing three guards together like that.
Conley would have been perfect for Utah. He would've fit alongside Mitchell thanks to his three-point shooting and could have taken some of the ball-handling pressure of him. Nothing on the defensive end would have been lost as well.
On the Otto Porter trade…
This trade was strange. If you're Washington, you can't solve your biggest problem (John Wall's albatross of a contract), and while that means moving Porter is okay, it doesn't mean that this was the move to make.
Washington sent Porter to Chicago for Jabari Parker, Bobby Portis and a second round pick. Thank God for that second round pick; it really does a lot of the makeup for this terrible, terrible trade.
First of all, Chicago couldn't have given you anything better? Did you not ask about Antonio Blakeney, or even Kris Dunn? Dunn straight up would have been a better deal, and you could have forced a pick out of Chicago had they given you Blakeney.
Secondly, did you not call a team like Dallas, Utah or Denver and gauge their interest? Those are all wing-needy teams who could be looking for third options offensively, and might have been willing to give up more than the equivalent to Parker and Portis.
Third, how do you feel good about Parker and Portis coming back for Porter? Porter's proto-type is one of the most coveted in the league right now. His value is way higher than what he went for. Plus, Parker is a terrible fit for a Wizards team that needs more unselfish players and better defenders. Parker is the complete opposite of both of those traits.
Oh! And he has a club option for this Summer, so you're not even getting him back because there's no way you're paying $20 million to him next year. So the value is completely gone!
The Wizards did get Bobby Portis, who's a young big that Washington could develop into something more. He's actually a perfect fit given some of the personalties in that locker room.
But Portis straight up isn't close to what could have been received for Porter, making this one hard to justify. I guess we can just say "Eh, it's the Wizards" and move on.
I was initially sour on Chicago's end of this trade, but have came a bit around. Despite being on that massive max contract, Porter is only 25 and has two years left on his deal. For the Bulls, he can be kind of a leader for them, and an effective one on the court too. He could help them defensively, an area they could use it as they rank 24th in defensive rating. By the time Porter's contract comes up again, the Bulls would hope to have something developing into a playoff squad. Porter, by then still only 27-28, could have some years left, and be willing to re-sign and try and push the Bulls into their new era.
Quick hits on the deadline:
Portland stayed quiet for the most part, but did end up swapping Caleb Swanigan for Skal Labissiere, a move I liked a lot. Both guys needed a change of scenery, and Labissiere is a nice mobile player Portland can try and find minutes for. The Kings are also pretty set rotation-wise, but need someone in the middle of their new lineup of De'Aaron Fox-Buddy Hield-Bogdan Bogdanovic-Harrison Barnes. Swanigan won't be the answer there, but with some development could turn into a bench big at some point.
Circling back to the Lakers, their trade for Reggie Bullock was a good one. LA essentially swapped a lights out shooter in Sviatoslav Mykhailiuk for another one in Bullock. Bullock gives LA better defense and more experience; you can trust him in a playoff game. The 21-year-old Mykhailiuk might have been a stretch in that spot.
The Kings made some good, interesting moves Thursday. Essentially, Sacramento traded Iman Shumpert and Skal Labassiere for Harrison Barnes and Alec Burks, escalating their timeline and giving them even more depth on the wing.
I addressed Barnes' fit above. Burks gives them another wing they can insert in off the bench. His length fits well with the Kings.
Value wise, Sacramento did great. Labassiere for impact guys like Burks and Barnes is a steal (Even though giving up Labassiere comes with a bit of a risk).
The Shumpert trade was a win-win. Sacramento got impact guys and Houston gets a guy who can hopefully help them out on the defensive end as James Ennis did not. He's also been great from three this season, so he fits Houston's scheme well.
The Cavaliers also benefitted from that three-teamer, netting a first round pick from Houston to take on Brandon Knight's contract (Once again an example of Houston's new owner being very, very cheap. Houston had to give up a 2nd rounder for Indiana to buy out Wade Baldwin and Nik Stauskas) and got Marquese Chriss on a flyer (I still believe in you Marquese!)
Speaking of the Suns, the Tyler Johnson trade felt a lot like last year's trade for Elfrid Payton, except a more expensive one. The Suns got rid of one horrific deal for another, but the second could actually provide some value. Johnson should get time next to Devin Booker at point guard, and theoretically, the two should be able to play off the other as he's a 35.3 percent shooter from three. It's worth the gamble, since the Suns didn't really have to give anything up. If Johnson fits, the Suns could have an answer at their weakest spot.
I wish the Suns would have kept Wayne Ellington, who also came over in that trade, but he deserved the chance to be on a competitive team.
I did not expect him to sign with the Pistons though, as they are on the fringe of what I would deem a "competitive" team. He's essentially the Bullock replacement (Detroit looks smart here, swinging Bullock for an asset and getting Ellington, a similar player) there. But teams like Philly and maybe even Golden State were calling. Why not go there?
The Barnes trade for Dallas made it clear they're all-in on this Summer. They, like a couple other teams, must know one guy is coming. Barnes was plenty effective for them, and they didn't really get anyone back (Justin Jackson is a tough evaluation. I liked him a lot but there's a real chance he's just terrible).
So what did we learn this deadline? 1) There's way too many teams who have their whole future hinging on this Summer. That's a scary proposition, and someone's going to lose out. 2) Philly is one of those teams, but it might be in their best interest to actually let themselves lose out a bit. If you let Butler leave and insert Harris as your 5th starter, isn't that a better team than what you entered this season with? Can Harris be the crunch-time option? 3) The Eastern Conference Playoffs are going to be fascinating. All four of the top teams have Finals-worthy talent. 4) The Kings are in position to get into the playoffs, and if they do, watch out. They could make some noise.
Super Bowl Roundup
The MLB's February Domino Fall


text:
\section{Introduction}

The Infrared Spectrograph (IRS; \citealt{Houck04a})\footnote{The IRS was a collaborative venture between Cornell University and Ball Aerospace Corporation funded by NASA through the
Jet Propulsion Laboratory and the Ames Research Center.} is one of three instruments on board the \textit{Spitzer} Space Telescope \citep{Werner04} along with two photometers,  Infrared Array Camera (IRAC; \citealt{Fazio04}) and Multiband Imaging Photometer for \textit{Spitzer} (MIPS; \citealt{Rieke04}). The IRS performed more than $20\,000$ observations over the cryogenic mission lifetime (December 2003 - May 2009), corresponding to $\sim15\,000$ distinct targets of various kinds (Tables\,\ref{tab:observations}, \ref{tab:stats}).
The IRS observed between $\approx5$ and $\approx38${\,$\mu$m}\ in two low-resolution modules ($R=\lambda/\Delta\lambda\sim60-120$) and $\approx10$ and $\approx37${\,$\mu$m}\ in two high-resolution modules ($R\sim600$). The main properties of these modules are described in Table\,\ref{tab:modules}. Most observations ($\approx85$\%) were performed in staring mode, i.e., as single sources or groups (``clusters'') of individual sources. The remaining corresponds to spectral mappings.

\begin{table}
\begin{center}
  \caption{Spitzer/IRS observations. }
  \label{tab:observations}
  \begin{tabular}{lll}
  \hline
  \hline
              &  AORkeys & Objects$^{\rm a}$ \\
  \hline
 High-res & 7192 / 8419  & 4219 / 5075  \\
 Low-res & 13565 / 16040 & 10308 / 12129  \\
 \hline
 Total$^{\rm b}$ & 17850 / 21337 & 12390 / 14582 \\
  \hline
  \end{tabular}
  \tablecomments{For each entry we provide the number of observations \\
  performed in staring mode and the total (staring and mapping). }
\tablenotetext{a}{Object names as given by the observer. }
\tablenotetext{b}{Some AORkeys were observed in both high- and low-resolution.  }
\end{center}
\end{table}

The Cornell Atlas of Spitzer/IRS Sources (CASSIS; \url{http://cassis.sirtf.com}), presented in \cite{Lebouteiller11a} (hereafter L11), provides users with every low-resolution spectra observed by the IRS in staring mode. The pipeline performs automated decisions concerning the background subtraction and the choice of extraction method best adapted to the source spatial extent. For unresolved sources, the optimal extraction scales the point-spread function (PSF) to the data spatial profile and provides the best signal-to-noise ratio (S/N) as compared to the full aperture extraction, with an improvement by a factor of two for sources $\lesssim300$\,mJy.
Furthermore, thanks to the super-sampled PSF, it became possible to perform optimal extraction for any source position along the slit. The super-sampled PSF also allows users to investigate complex source configurations (blended sources with/without extended emission component, sources shifted in the dispersion direction). While CASSIS provides the integrated spectra in such complex cases, the Spectroscopic Modeling Analysis and Reduction Tool (SMART; \citealt{Higdon04,Lebouteiller10}) can be used for a highly-customizable manual extraction allowing source disentanglement.

CASSIS represents a tool of important legacy value for preparing and complementing observations by future IR telescopes, in particular the \textit{James Webb} Space Telescope (JWST). The online CASSIS database allows users to download spectra of publishable quality, and a local access to the full database is offered on request for large datasets. Since publication of L11, several updates have been made to the low-resolution pipeline (see Appendix\,\ref{app:lowres}). CASSIS has been used extensively for massive dataset analysis or specific targets (e.g.,  \citealt{Gonzalez15,Brisbin14,Lyu14,Sargsyan14,Sargsyan12,Brown13,Farrah13,Feltre13,Gonzalez13,Hernan12,Hurley12,LeFLoch12,Weedman12}).

\begin{table*}
\begin{center}
  \caption{Number of observations and distinct sources in the CASSIS atlas per scientific category.}
  \label{tab:stats}
  \begin{tabular}{l ll l}
  \hline
  \hline
 Category & Low-res & High-res & Total \\
  \hline
 ``Cosmology'' & 3 / 3   &  0 / 0 & 3 / 3   \\
  ``Cosmic infrared'' & 36 / 36 & 0 / 0 & 36 / 36 \\
 ``Galaxy clusters'' & 49 / 61    &  11 / 12 &  55 / 73   \\
 \hline
   ``High-z galaxies'' & 974 / 1258   &  35 / 40 & 993 / 1298  \\
 ``Intermediate-z galaxies'' & 838 / 844   & 45 / 46  & 862 / 890   \\
 ``Nearby galaxies'' &  462 / 488  & 207 / 216 &  603 / 704   \\
  ``Local Group galaxies'' & 536 / 561   &  26 / 27 & 542 / 588  \\
   ``Galactic structures'' & 13 / 13   &  0 / 0  & 13 / 13 \\
  \hline
 ``Interacting, mergers'' & 159 / 164   &  96 / 97  & 201 / 261 \\
  ``AGN, quasars, radio-galaxies'' & 1394 / 1559 &  490 / 538 & 1549 / 2097  \\
 ``ULIRGS, LIRGS'' &  611 / 632  & 429 / 440 &  777 / 1072  \\
 ``Starburst galaxies'' & 128 / 133   &  32 / 34 & 153 / 167  \\
 \hline
 ``Extragalactic jets'' & 1 / 5   & 0 / 0 & 1 / 5   \\
  ``Gamma-ray bursts'' & 4 / 4  &  2 / 2   & 4 / 6 \\
  ``Compact objects'' & 46 / 59   &  10 / 11  & 49 / 70 \\
  ``ISM            & 830 / 893   & 279 / 290  &  941 / 1183  \\
  ``H{~\sc ii}\ regions'' & 55 / 59    & 12 / 15  & 56 / 74  \\
\hline
 ``Extragalactic stars'' & 164 / 165 &  6 / 6 & 170 / 171 \\
 ``Stellar population'' & 161 / 218    &  6 / 6  & 167 / 224 \\
``Massive stars'' & 152 / 159   &  79 / 81 & 198 / 240  \\
``Evolved stars'' & 1129 / 1304   &   893 / 1166 & 1581 / 2470  \\
``Brown dwarfs'' &  250 / 290    & 27 / 28 & 254 / 318  \\
\hline
 ``Star formation'' & 527 / 582   &  95 / 102 & 590 / 684  \\
 ``Young stellar objects'' & 1532 / 1691   &  336 / 352 & 1655 / 2043  \\
 ``Circumstellar disks'' &  2378 / 2524   & 477 / 531  &  2616 / 3055 \\
 \hline
 ``Extra-solar planets'' & 2 / 7    &  0 / 0 & 2 / 7  \\
 ``Planets'' & 24 / 32  & 16 / 18  & 24 / 50 \\
 ``Satellites'' & 22 / 23  &  14 / 15  & 24 / 38  \\
 ``Asteroids'' & 166 / 170  & 0 / 0 & 166 / 170 \\
 ``Kuiper belt objects'' & 31 / 31  & 0 / 0 & 31 / 31 \\
 ``Near-earth objects'' & 12 / 12  & 0 / 0 & 12 / 12 \\
 ``Comets'' & 41 / 54  & 48 / 59 & 77 / 113 \\
  \hline
  Total & 12720 / 14034   & 3623 / 4132 & 14405 / 18166    \\
  \hline
  \end{tabular}
  \tablecomments{Here we consider observations performed on sources within groups (``cluster mode observations'') as distinct observations, since several observations can be part of a single AOR. For this reason, the number of observations in this Table differs from what is given in Table\,\ref{tab:observations}.
  For each category, we provide the number of distinct sources (calculated by using a separation threshold of $>4\arcsec$ from other sources within the same category) and the total number of observations. The full list of programs with their assigned category can be found at \url{http://isc.astro.cornell.edu/Smart/ProgramIDs}. Since only one category was assigned to any given program, some sources may have a false category identification. }
\end{center}
\end{table*}

In the present paper, we describe optimal extraction for the IRS high-resolution observations using a newly determined empirical super-sampled PSF.
The two high-resolution modules use echelle spectroscopy as opposed to long-slit spectroscopy for low-resolution. In the following we refer to ``aperture'' for \textit{short-high} (SH) and \textit{long-high} (LH) as opposed to ``slit'' for \textit{short-low} (SL) and \textit{long-low} (LL). The high-resolution modules contain $10$ spectral orders (see Table\,\ref{tab:modules} and Figure\,\ref{fig:background_pattern} for a description of the detectors). Staring observations work the same way as for low-resolution observations, i.e., a source is observed in two nod positions, located at about $1/3$ and $2/3$ of the aperture length.
With a spectral resolution $\sim10$ times higher than SL and LL, high-resolution observations are ideal for spectral line measurements and identification (and disentanglement) of narrow features that may be blended in the low-resolution spectra. For comparison, the FWHM in SH and LH observations, $\approx350-500$\,{\,km\,s$^{-1}$}\ depending on the spectral order, is somewhat larger than \textit{Herschel}/PACS ($60-320${\,km\,s$^{-1}$}). Furthermore, since higher spectral resolution effectively results in lower signal-to-noise on the continuum for a given exposure time, high-resolution observations targeted mostly nearby bright sources (Table\,\ref{tab:stats}). The differences between high- and low-resolution observations performed with the IRS translate into several important differences as compared to the pipeline for low-resolution data that was presented in L11.

\begin{table*}
\begin{center}
  \caption{Main properties of the Spitzer/IRS modules. }
  \label{tab:modules}
  \begin{tabular}{cccccc}
  \hline
  \hline
  Module & $\lambda/\Delta\lambda$ & Aperture size  & Pixel scale  & Order(s) & $\lambda_{\rm min}-\lambda_{\rm max}$ \\
   &  & ($\arcsec$)  & ($\arcsec$) &  &  ({\,$\mu$m}) \\
  \hline
  SL & 60-127 & 3.7$\times$57 & 1.8& 1 & 7.4 - 14.5  \\
   &  & & & 2 & 5.2 - 7.7   \\
   &  & & &  bonus & 7.3 - 8.7 \\
  \hline
  LL & 60-127 & 10.7$\times$168 & 5.1 & 1 & 19.5 - 38.0  \\
   && &   & 2  & 14.0 - 21.3  \\
   & & & & bonus  & 19.4 - 21.7   \\
  \hline
  SH & 600 & 4.7$\times$11.3 & 2.3& 11-20 & 9.9 - 19.6  \\
  \hline
  LH & 600 & 11.1$\times$22.3 & 4.5 & 11-20 & 18.7 - 37.2 \\
  \hline
  \end{tabular}
\tablecomments{More information can be found at \url{http://cassis.sirtf.com/atlas/irs_pocketguide.pdf}.}
\end{center}
\end{table*}

We first present the pipeline steps related to the detector images in Sect.\,\ref{sec:imsteps}. We then explain the full aperture extraction in Sect.\,\ref{sec:fullap} and optimal extraction in Sect.\,\ref{sec:optext}. In Section\,\ref{sec:opt_extended} we describe how the pipeline decides the best extraction method based on the source spatial extent. Finally, the post-processing steps at the spectrum level are described in Sect.\,\ref{sec:specsteps}.

\section{Detector image processing}\label{sec:imsteps}

\subsection{Individual exposures}\label{sec:discard}

The CASSIS pipeline uses the Basic Calibrated Data (BCD) images as starting products\footnote{Tests were made with ``droop'' images (identical to BCD images except lacking the flat-field), but there were no visible improvements in the final products.}, along with the corresponding uncertainty images and the bad pixel mask. The BCD images are produced by the \textit{Spitzer} Science Center BCD pipeline. We refer to L11 for details on BCD images.

Individual exposure times for SH are $6$, $30$, $120$, or $480$ seconds. Exposure times for LH are $6$, $14$, $60$, or $240$ seconds.
There is one set of data/uncertainty/mask images per exposure. The mask reflects possible problems identified by the pipeline. Before the exposures are combined (Sect.\,\ref{sec:ip_expcomb}), the pixel masks are first compared over the exposures. Some pixels may have a lower mask value in some exposures, and therefore indicate more reliable values. For each pixel of the detector image, we select only the exposures having the mask values $<256$. Pixels with higher mask  value (corresponding to non-correctable saturation, missing data in downlink, one or no usable ramp planes, or pixels for which the stray-light removal or cross-talk correction could not be performed) are ignored in the other exposures. For the vast majority of cases, the lowest mask value is null (i.e., the pixel flux is reliable).

\subsection{Exposure combination}\label{sec:ip_expcomb}

For a given module, order, and nod position, the flux of each detector pixel is compared over the exposures. For each pixel, the exposures in which the mask value is relatively higher are  discarded (Sect.\,\ref{sec:discard}), thereby selecting only the most reliable exposures for the combination. The final pixel flux value is the weighted-mean over the selected exposures. Weights are given according to the sequence number of the exposure because the first exposures are most affected by patterns and gradients present in the detector background (Sect.\,\ref{sec:detbg}). The relative weights are $1$, $3$, $5$ for the three first exposures, and $6$ for the remaining ones. The same weights are applied when the number of exposures is small (e.g., weights $1$ and $3$ for two exposures).

Since uncertainties on the individual pixels in exposure images may have been underestimated by the BCD pipeline, a simple quadratic sum of the uncertainties is not always accurate. For this reason, we calculate the uncertainties on the combined image as the maximum between the standard deviation of the mean of the pixel values over the exposures and the quadratic sum of the uncertainties.

\subsection{Detector background and order corrugation}\label{sec:detbg}

\begin{figure}[b!]
\includegraphics*[angle=0,width=8cm]{Figures/saturated-exposure.pdf}
\caption{LH detector image ($128\times128$\,px$^2$) of a heavily saturated source. Vertical white bands show the $10$ individual spectral orders in which the source is observed. For each spectral order, the wavelength axis is approximately vertical and the cross-dispersion axis is approximately horizontal. In the text we refer to rows and columns to describe the detector rows and columns in a given spectral order.
The detector shows in this case artifacts in the form of several diagnonal streaks. This artifact is different from the background gradient presented in Fig.\,\ref{fig:background}. }
\label{fig:background_pattern}
\end{figure}

The high-resolution detectors (in particular LH) sometimes show light traces across or gradients. These artifacts manifest themselves in the exposure image in two different ways:
\begin{itemize}
\item The background ``gradient'' is an unevenly distributed excess dark current throughout the detector (Fig.\,\ref{fig:background}). It affects as much as $\sim10$\%\ of the observations and is likely caused by a dark current residual. The detector background is generally more prominent during the observation of bright sources, with a fraction of the source's light scattered within the instrument. The detector may also be affected through latency by the prior observation of another, bright source. The intensity of the background gradient decreases systematically with the exposure number.
\item The background ``pattern'', made of diagonal streaks always appearing at the same locations (Fig.\,\ref{fig:background_pattern}) arises during or after the observation of extremely bright sources heavily saturating the detector. This pattern is mostly visible in a handful of observations and consists of several clumps/traces of pixels with a non-zero level. The pattern appears to be related to a permanent bias in some pixels of the detector.
\end{itemize}
\noindent The background pattern, when visible, is associated with heavily saturated sources for which most, if not all, pixels within the spectral orders are masked out, making it an irrelevant artifact to fix. In the following, we describe possible corrections to the background gradient, which is the main cause of artifacts for the high-resolution observations, giving rise in particular to spectral order tilts if not corrected.

\begin{figure*}
\begin{centering}
\includegraphics*[angle=0,width=14cm,height=3.5cm,trim=0 0 0 0]{Figures/background_sh2.pdf}
\includegraphics*[angle=0,width=14cm,height=3.5cm,trim=0 0 0 0]{Figures/background_lh2.pdf}
\caption{Detector background removal for SH ($\xi$Dra, top) and LH (HD\,97300, bottom). \textit{Left} $-$ Input image with the contrast adjusted to visualize the low-level background gradient, \textit{center} $-$ background calculated with a 2D surface interpolation, \textit{right} $-$ corrected image. The scale is identical for all images in a given module (set to $20$\% of the median flux within the spectral orders). The SH spectral orders are not well separated, making it difficult to determine the background throughout the detector. As can be seen in the top-center image, one solution is simply to extrapolate the background from the left side of the detector. However, considering the uncertainties on the SH background and the fact that the SH gradient is less problematic than the LH one, we have chosen not to correct for it (see text).  }
\label{fig:background}
\end{centering}
\end{figure*}

Removing a dedicated offset background image can mitigate the detector background artefact, but since the background gradient seems to depend on the source brightness, the correction is usually not satisfactory. Furthermore, dedicated offset background images are not always available or usable (Sect.\,\ref{sec:bgsub}) The difference between the two nod images (see Sect.\,\ref{sec:optext_flavors}) somewhat improves the removal of the background gradient but because of the separation in time between the two nod observations, a residual gradient still remains.

In order to correct for the detector background gradient, one possibility is to use the \texttt{dark\_settle}\footnote{\url{http://irsa.ipac.caltech.edu/data/SPITZER/docs/dataanalysistools/darksettle/downloaddarksettle/}} algorithm provided by the SSC. This algorithm works for the LH detector only and computes a robust inter-order mean for a given row and smooths along the column. It then subtracts this mean from all the data in the row. In this way, the inter-order region for each row is set to zero. The \texttt{dark\_settle} algorithm partly removes  the detector background but residual large-scale variations are often still observed. Furthermore, the detector background gradient is not necessarily a simple slope along the columns. Therefore, we decided to implement a custom algorithm that computes the smoothed 2D surface of the detector using only the inter-order data, and interpolates over the spectral orders (Fig.\,\ref{fig:background}). In practice, the spectral orders are first masked using a conservative mask that ensures that no emission from the source is accounted for. This mask was created specifically for this purpose. The background image is then smoothed and interpolated over the spectral orders by means of a smoothed quintic surface. Note that for both \texttt{dark\_settle} and our own algorithm, the calculated correction has to be performed on the unflatfielded image. The interpolated surface calculated this way is not reliable for the SH detector since the spectral orders in this module are too close to each other on the detector image, as can be seen in Fig.\,\ref{fig:background}. Therefore we never attempt to correct for the detector gradient for SH.

Despite the success of mitigating the detector background gradient and significantly improving the LH spectra quality, our tests show that if the number of exposures is large enough, the combination of exposure images mitigates even better the gradient. The first exposure (in each nod observation) is indeed always the most affected by the gradient, which usually becomes negligible after $\gtrsim4$ exposures. For this reason, we chose to apply our background removal algorithm to LH data only when the number of exposures is $\leq2$. For a larger number of exposures, we simply rely on the exposure combination with relatively smaller weight given to the first exposures (Sect.\,\ref{sec:ip_expcomb}). The detector background is never removed for the SH detector, and the first exposures are simply given less weights.

Despite the corrections applied above, some residual emission may remain that \textit{appears} as extended emission component in the aperture. If such a component is present, it is possible to remove it at a later stage when the optimal extraction is performed (Sect.\,\ref{sec:optext}).

\begin{figure*}
\hspace{-0.5cm}
\includegraphics*[angle=0,width=14cm]{Figures/imdiff3.pdf}
\caption{Illustration of low-level rogue pixels being removed by differencing the two nod images. The scale is the same for all images. The resulting difference image can be optimally extracted if a differential PSF profile is used (Sect.\,\ref{sec:optext_flavors}).
}
\label{fig:imdiff3}
\end{figure*}

\section{Full-aperture extraction}\label{sec:fullap}

We describe in this section how images are used to perform a full aperture extraction. This extraction method simply co-adds the pixels in a given pseudo-rectangle (area in the detector corresponding to one wavelength value) to compute the flux. Since the flux is integrated, the presence of bad pixels anywhere within the pseudo-rectangle is particularly harmful. Therefore, bad pixels need to be  identified and replaced. The cleaning is performed on the combined image of all exposures since bad pixels are replaced using neighbors whose flux is more reliable when exposures have been combined.

We use the IRSCLEAN\footnote{\url{http://irsa.ipac.caltech.edu/data/SPITZER/docs/dataanalysistools/tools/irsclean/}} tool to substitute bad pixels in the following order:
\begin{itemize}
\item pixels with no values (NaNs) that may remain after exposure combination,
\item pixels with a high bad pixel mask value ($>256$; see Sect.\,\ref{sec:discard} for the description of the corresponding instrumental artifacts),
\item bad pixels and rogue pixels (i.e., pixels with a significant variations in their responsivity over time) flagged in the campaign mask,
\item pixels with a large uncertainty ($>10$ times the median uncertainty in the image),
\item negative pixels, if $>10$ times the median uncertainty.
\end{itemize}

\noindent The new pixel value is calculated by the IRSCLEAN algorithm mainly based on neighboring pixels, although in some cases IRSCLEAN cannot substitute every eligible pixel due to clustering. Uncertainties and mask values are propagated for each step. The full-aperture extraction is performed using the standard tool in SMART. Contrary to optimal extraction (Sect.\,\ref{sec:optext}), the flux determination in the full-aperture extraction does not depend on the individual pixel uncertainties since the pixel values are simply summed. An error on the flux is ultimately calculated using the quadratic sum of the pixel uncertainties in the pseudo-rectangle.

There is no background subtraction by default for full-aperture extraction. Although dedicated offset background observations may exist, they are not considered in the current version of CASSIS (Sect\,\ref{sec:bgsub}) and the extracted spectrum simply corresponds to the addition of the source spectrum and any background emission that may be present. Note that it is always possible to download the full-aperture extracted spectrum of the dedicated background observation (if known) separately and subtract it from the science source spectrum. In this case it is preferable to subtract the background at the image level to remove potentially bad pixels but the subtraction of the two spectra corrects for any emission not related to the nominal source.

\section{Optimal extraction}\label{sec:optext}

Optimal extraction uses the PSF profile to compare to the data spatial profile in order to calculate the flux density (see e.g., \citealt{Horne86}). Optimal extraction provides a spectrum with a higher signal-to-noise ratio when the source is unresolved. In the following, we describe how bad pixels are handled by the algorithm, how the super-sampled PSF is created, and how optimal extraction is performed on the data.

\subsection{Bad pixels}

For the optimal extraction, and contrary to full aperture extraction (Sect.\,\ref{sec:fullap}), the bad pixels that were identified do not have to be substituted since the PSF is fitted to the spatial profile of the object at any  wavelength. Therefore, gaps in the spatial profile are not problematic as long as the spatial profile is sufficiently sampled. In cases when the spatial profile cannot be reliably analyzed because too many pixels are missing, the corresponding wavelength row is flagged as being unusable during the extraction step (Sect.\,\ref{sec:optext_core}). Another difference with the treatment of bad pixels between full aperture and optimal extraction is that uncertainties on individual pixels are used to determine the flux for the optimal extraction. Therefore, bad pixels are identified using the same steps as for full aperture (Sect.\,\ref{sec:fullap}) \textit{except for the pixels with large uncertainties} which are kept as such for optimal extraction.

Many transient pixels, also referred to as low-level ``rogue'' pixels, are not flagged and are usually best corrected for by removing a background exposure. In the majority of observations, no dedicated background pointing was performed (Sect.\,\ref{sec:bgsub}). In such cases, it is still possible to subtract the other nod observation (Fig.\,\ref{fig:imdiff3}) as long as one accounts for the resulting differential spatial profile for extracting the flux (Sect.\,\ref{sec:optext_core}).

\begin{figure}[h]
\includegraphics*[angle=0,width=7.8cm,clip=true]{Figures/sspsf2.pdf}
\caption{The super-sampled PSF for SH and LH. Wavelength increases from bottom to top. The black lines below indicate the approximate size of the aperture and the relative location of the super-sampled PSF within the aperture at the two nod positions. The super-sampled PSF was created on a grid with sub-pixels three times smaller than the pixel in the SH and LH detectors. The data beyond the secondary peak is that of the model PSF (see text). Such data is not used in standard observations in which the source lies in the aperture.  }
\label{fig:sspsf}
\end{figure}

\subsection{Super-sampled PSF}\label{sec:sspsf}

A super-sampled PSF, either theoretical or empirical, is necessary for the optimal extraction of sources located anywhere in the aperture. The super-sampled PSF is built from mapping observations of point-like sources ($\xi$ Draconis for SH and Sirius for LH) scanned along and across the apertures, with a step size smaller than the size of a pixel. We  performed an iterative reconstruction of the high-resolution spatial profile from the under-sampled data. We refer to \cite{PinheirodaSilva06} and L10 for details on the algorithm. The resolution on the PSF was increased by a factor of three for SH and LH.

\begin{figure*}
\includegraphics*[angle=0,width=16.8cm]{Figures/sspsf_profile3.pdf}
\caption{Illustration of the super-sampled PSF creation steps for one row of one spectral order in the SH detector (pixels in one row of a given spectral order have approximately the same wavelength). The thick vertical lines mark the region in which the PSF was calculated (the ``output window''). Black segments represent input observations (i.e., sequence of exposures with the star located at various positions in the aperture). Blue dots show the co-addition of all input data (used for bad data replacement). Fractions of the PSF are calculated within ``sub-windows'' that are shown with the red dots (covering the full sub-window) and red lines (covering only the part of the sub-window that will contribute to the final PSF). Purple crosses indicate image data that was discarded based on our data replacement algorithm.
The final super-sampled PSF is shown by the shifted red profile in the lower part of the plot, along with the \texttt{STINY\_TIM} 2D PSF (collapsed in the dispersion direction; green), and a Gaussian fit to the core (purple).
}
\label{fig:sspsf_profile}
\end{figure*}

A major difference with the algorithm used for the low-resolution PSF described in L11 is that the SH and LH apertures are relatively small and miss a fraction of the desired PSF profile in any given observation. Figure\,\ref{fig:sspsf} shows the relative location of the PSF within the aperture for the two nod positions. Since the PSF is never fully sampled, we built the super-sampled PSF ``piece by piece''. For this (1) we first cut our desired output window (that eventually contains the final super-sampled PSF) into many overlapping sub-windows with the same size as the aperture, (2) calculated super-sampled PSFs for each of these output windows separately\footnote{Only the central part of the sub-windows are actually used, in order to mitigate edge effects related to systematic uncertainties at the edge of the aperture.}, and (3) combined them together into a final PSF covering the desired range. We also added various steps of regularization and data filtering/replacement in order to improve the quality of the final PSF. An illustration of the super-sampled creation process is shown in Fig.\,\ref{fig:sspsf_profile}.
The super-sampled PSF provides an important improvement over the model created from the  \texttt{STINY\_TIM}\footnote{\url{http://irsa.ipac.caltech.edu/data/SPITZER/docs/dataanalysistools/tools/contributed/general}} 2D PSF collapsed in the dispersion direction (green profile in Fig.\,\ref{fig:sspsf_profile}). .

\begin{figure}
\includegraphics*[angle=0,width=8cm,height=4.2cm,trim=60 60 20 30]{Figures/compa_10.pdf}
\includegraphics*[angle=0,width=8cm,height=4.2cm,trim=60 60 20 30]{Figures/compa_15.pdf}
\includegraphics*[angle=0,width=8cm,height=4.2cm,trim=60 60 20 30]{Figures/compa_20.pdf}
\includegraphics*[angle=0,width=8cm,height=5.0cm,trim=60 0 20 30]{Figures/compa_30.pdf}
\caption{Comparison between the CASSIS super-sampled PSF and the c2d analytical profile \citep{Lahuis07PhD} for selected wavelengths in SH ($15,20${\,$\mu$m}) and LH ($20,30${\,$\mu$m}). The CASSIS PSF reaches a higher resolution on the actual instrumental profile, resulting in the core being slightly narrower and the first Airy ring being slightly brighter. }
\label{fig:c2dcompa}
\end{figure}

Our approach to the PSF is different from the c2d project optimal extraction \citep{Lahuis07PhD,Lahuis07,Lahuis10}, the latter using an analytical cross-dispersion PSF (described as a cardinal sine function with a harmonic distortion component). A comparison of our super-sampled PSF to the c2d analytical instrumental profile reveals a slightly narrower PSF core and more power in the first Airy ring (Fig.\,\ref{fig:c2dcompa}). These differences result from the fact that the super-sampled PSF achieves a better resolution on the instrumental profile by improving on the originally low sampling of the PSF in the data, while the c2d PSF is calculated by fitting a model to the original (not super-sampled) data.

A super-sampled PSF was thus created for the first time for SH and LH that provides the profile of a point-source anywhere in the aperture (Fig.\,\ref{fig:sspsf}). While the sources are well-centered in the aperture in the \textit{dispersion} direction in most observations, we have also computed the super-sampled PSF at various positions across the \textit{dispersion} direction. Such profiles can be used to perform an optimal extraction of mispointed sources. For the CASSIS online repository, however, we assume the source to always be centered in the \textit{dispersion} direction. The source position along the \textit{cross-dispersion} direction is a free parameter (Sect.\,\ref{sec:sf}).

\subsection{Spatial under-sampling}\label{sec:undersampling}

The shortest wavelengths of SH and LH can be affected by spatial under-sampling. For these wavelengths, the FWHM of the PSF is on the order of one pixel, which requires the use of a super-sampled PSF (Sect.\,\ref{sec:sspsf}) together with an accurate source position. When a source shifts \textit{within} a given detector pixel, the intra-pixel responsivity can lead to significant variations in the estimated flux. Ignoring the under-sampling effect may result in wiggles in the extracted spectrum, which is the result of the spectral trace (position of the source centroid in the detector for a given spectral order) not being perfectly orthogonal with the detector axes.

For the low-resolution pipeline of CASSIS, the undersampling was apparent for LL2 (at wavelengths $\lambda\lesssim21${\,$\mu$m}), SL2 ($\lambda\lesssim8${\,$\mu$m}), and SL1 ($\lambda\lesssim14${\,$\mu$m}), by order of importance. The correction was performed by applying an empirical intra-pixel response function to the projected PSF on the detector grid, the corrective function being closer to unity with increasing wavelength.

The smallest wavelength in SH is $\approx10${\,$\mu$m}, so we expect the under-sampling problem in SH to be equally important as for SL1, i.e., minor. The first release of the CASSIS high-resolution pipeline assumes that under-sampling effects in SH can be ignored. The smallest wavelength in LH is $\approx19${\,$\mu$m}, and under-sampling problems do appear for the shortest wavelengths ($\lesssim24${\,$\mu$m}), requiring the use of an empirical correction. The latter was performed the same way as for the low-resolution modules, with an intra-pixel responsivity decreasing with distance from the pixel center and with a correction decreasing with wavelength.

\subsection{Optimal extraction kernel}\label{sec:optext_core}

Our pipeline uses a super-sampled PSF (Sect.\,\ref{sec:sspsf}) and a multiple linear regression to fit the source spatial profile. The latter is reproduced by the combination of the super-sampled PSF itself and a large-scale emission that can be parametrized (which we choose as a polynomial of order $0$). The super-sampled PSF is first shifted to the source position, resampled, and finally scaled to the data profile. The scaling factor and large-scale emission are fitted simultaneously.

As for the low resolution algorithm in L10, the high-resolution algorithm uses a weighted multiple linear regression, but within an iterative process. The incomplete covering of the PSF profile and the higher occurrence of bad pixels in the high-resolution modules results in a relatively smaller number of available pixels as compared to the low-resolution modules. In the first iteration, the flux is calculated several times, by elevating the weight of every pixel in the core of the spatial profile. This gives up to $4-5$ flux determinations. Outlier flux values are then flagged, and the uncertainty on the corresponding pixel is increased, since it is likely bad. In the second iteration, its weight is thus reduced. The iterations continue until there are no more outliers. In practice, only one or two iterations are needed.

\noindent Several complications may occur:
\begin{itemize}
\item The flux values determined using each pixel in a given row do not agree within errors. In that case, we give less weight to the pixel corresponding to the outlying flux value, and we perform another iteration.
\item Pixels with no valid value are not considered for the fit. In order to reflect the uncertainty associated with missing information, we calculate the fraction of flux in the valid pixels compared to the expected flux. The uncertainty on the final flux determination is then scaled up by an empirical coefficient inversely proportional to this fraction.
\item The model profile is always positive but some pixels can have negative values. The model is therefore never able to accommodate the sign inconsistency, regardless of the weights. Hence, rather than letting the model be biased toward low flux values, we replace the bad pixel with a null value and we increase the error bar, if necessary, to accommodate with the old value.
\end{itemize}

\subsection{Source finder}\label{sec:sf}

The source position is first approximated from a Gaussian fit to the collapsed spatial profile over all the wavelengths of all spectral orders. A more accurate position is then found through an iterative process. The position is varied around this first guess, and for each position the super-sampled PSF is calculated (i.e., shifted at the right position and resampled). Residuals are then calculated the same way as for the low-resolution optimal extraction \citep{Lebouteiller10}. In short, the (collapsed) spatial profile of the image is compared to the (collapsed) spatial profile of the image minus the source model. The goal is to minimize the latter difference. The accuracy is typically less than $1/10$th of a pixel, i.e., similar to what is accomplished for the low-resolution algorithm.

\subsection{Extended background}\label{sec:optext_extended}

We refer to the extended backgound emission as the emission that uniformly fills the aperture and that, in most cases, is not associated to the nominal science source.
The extended backgound emission within the aperture is either instrumental (e.g., residual from the detector background gradient; Sect.\,\ref{sec:detbg}) and therefore a function of the detector row index, and/or it is physical and therefore a function of wavelength. Extended background emission unrelated to the source can originate from zodiacal emission or high galactic latitude cirrus clouds. In some cases, extended emission may be physically associated with a point source, e.g., an active galactic nucleus and the host galaxy.
Note that if the science source in the aperture is found to be extended, the full aperture extraction will be the default method and dedicated offset images need to be used to remove the unassociated background (Sect.\,\ref{sec:bgsub}).

On first approximation, the extended background in the aperture takes the shape of a plateau underneath the PSF. The multiple linear regression algorithm allows for a constant term to be calculated simultaneously with the PSF scaling factor (Sect\,\ref{sec:optext_core}). For the high-resolution observations however, the number of degrees of freedom is relatively small and the spatial profile does not cover much of the extended background far from the PSF core. For this reason, a first iteration is performed in which the extended background level is derived using the multiple linear regression, and the derived background spectrum is then slightly smoothed as a function of the row index, before being removed from the spatial profile in a second iteration.

The philosophy of CASSIS is to provide the spectrum of point sources or extended sources. Apart from the removal of the extended background, no profile decomposition is available (e.g., multiple and blended point sources).
In the website, users are encouraged to examine the spatial profile and validate the CASSIS approach. Furthermore, since in certain cases users may be interested in comparing the point source spectrum to that of the extended background (or investigating only the extended background), links are provided to download the extended background spectrum separately. Figure\,\ref{fig:decomp} illustrates how CASSIS disentangles the point-source emission from the extended \textit{physical} background in the observation of the star HD\,36917. The extended background is completely removed by CASSIS, resulting in the featureless point source spectrum and achieving the same result as the dedicated effort by \cite{Boersma08} for this particular source.

\begin{figure
\includegraphics*[angle=0,width=8cm,height=5cm,trim=0 1cm 0 14.8cm]{Figures/decomp/positionguess_nods.pdf}
\includegraphics*[angle=0,width=8cm,height=3.6cm,trim=0 1.4cm 0 0]{Figures/decomp/specfull_pls_cont_nodcomb_cl.pdf}
\includegraphics*[angle=0,width=8cm,height=3.6cm,trim=0 1.4cm 0 0]{Figures/decomp/specopt_cont_diff.pdf}
\includegraphics*[angle=0,width=8cm,height=4.0cm,trim=0 0 0 0]{Figures/decomp/specfull_res_cont_nod1_ext.pdf}
\caption{The SH spatial profile of the Herbig Ae/Be star HD\,36917 (AORkey 11001600)  is shown on top; it consists of a point source and a background pedestal emission. The lower panels show from top to bottom the spectra from full aperture extraction, differential optimal extraction, and from the extended background. CASSIS optimal extraction extracts simultaneously the featureless point source and the extended background with bright emission from polycyclic aromatic hydrocarbons at $\approx11.3${\,$\mu$m}.  }
\label{fig:decomp}
\end{figure}

\subsection{Uncertainties on the flux}

For all flavors of optimal extraction (Sect.\,\ref{sec:optext_flavors}), the flux uncertainty for a given wavelength element is the error in the PSF scaling factor. This error is dominated by the uncertainties on the pixels of the image fed to the optimal extraction core. An uncertainty is also calculated for the extended background, since an error on the latter results in an error on the point-source flux. Other sources of uncertainties (fringe correction, nod combination, calibration) are also quantified by the pipeline.

\subsection{Optimal extraction methods}\label{sec:optext_flavors}

The optimal extraction as described in Sect.\,\ref{sec:optext_core} can be performed on various image products. The regular method consists in scaling the PSF directly to the data spatial profile (Sect.\,\ref{sec:reg}) while the differential method uses the subtraction between two nod images (Sect.\,\ref{sec:diff}).

\subsubsection{Regular method}\label{sec:reg}

Optimal extraction can be performed on the two nod images \textit{individually}, producing two  independent spectra which can be merged eventually into a single spectrum. The main drawback of this method is that few pixels are available for scaling both the super-sampled PSF and the large-scale emission in the aperture simultaneously (see Sects.\,\ref{sec:optext} and \ref{sec:optext_extended}).

Optimal extraction can also be performed on the two nod images \textit{simultaneously}. In this case, we extract a single spectrum from the two images, taking advantage of a better sampling of the source spatial profile provided by the different nod positions in the detector. For this method, we assume that the PSF scaling factor and the background emission component will be identical for both nod images for a given wavelength in a given spectral order. The redundancy improves significantly the quality of the optimal extraction, in particular when bad pixels plague the image. The background emission is particularly better determined since by combining the two nod profiles, one can sample both sides of the PSF at the same time.

The two methods described above are used in our pipeline in complementary ways, in the following order:
\begin{itemize}
\item Optimal extraction of the two nods \textit{individually} to find the source position in each nod observation (see explanations on source finder in Sect.\,\ref{sec:sf}). The background emission component is ignored for this step since it is not an important parameter for the source finder.
\item Optimal extraction of the two nods \textit{simultaneously}, using the source positions from the previous step. This results in a single spectrum for the science object. The extended background spectrum is saved as an optional product.
\end{itemize}

\begin{figure}
\includegraphics*[angle=0,width=8cm,height=3.7cm,trim=0 15 0 0]{Figures/ksidra_o18_r18_nod1_new.pdf}
\includegraphics*[angle=0,width=8cm,height=3.7cm,trim=0 15 0 0]{Figures/ksidra_o18_r18_nod2_new.pdf}
\includegraphics*[angle=0,width=8cm,height=3.7cm,trim=0 15 0 0]{Figures/ksidra_o18_r18_nods_new.pdf}\hskip 1.5em
\includegraphics*[angle=0,width=8cm,height=4.5cm,trim=0 5 0 0]{Figures/ksidra_o18_r18_noddiffnew2.pdf}
\caption{Optimal extraction methods for various image combinations. Plots are shown for a given row of a given order (i.e., corresponding to one wavelength element). Data (large diamonds) is plotted with an arbitrary flux density scale as a function of the pixel sequence number along the row. In the nod 1 profile, one data point is missing from the profile, but the remaining points allow for a reliable scaling. In the concatenated nod profiles, the profiles are combined into a single profile and the PSF scaling factor is the same for both nods  (although it appears different because of the different sampling). }
\label{fig:flavors}
\end{figure}

\subsubsection{Differential method}\label{sec:diff}

Another method consists in subtracting the two nod images from each other (Fig.\,\ref{fig:flavors}). This subtraction is a reliable way of correcting low-level rogue pixels whose responsivity remains abnormal over a typical observation timescale (Fig.\,\ref{fig:imdiff3}). Since such rogue pixels are numerous in the detector images, a cleaning algorithm is rendered ineffective and in fact more harmful than useful.

For the differential optimal extraction, the two nod images are subtracted from each other (uncertainties being propagated). The subtraction produces a differential source profile which is scaled to the model in the same way as the regular method, except that the model is itself a differential super-sampled PSF. The latter is created from two normal super-sampled PSFs shifted in positions and inverted in flux.

The differential method is adapted for the extraction of unresolved sources, even when the latter are entangled with extended emission. As long as the extended emission is physical, the difference between the two nod images effectively removes the background and produces the spectrum of the unresolved source.
As explained in Sect.\,\ref{sec:opt_extended}, the differential optimal extraction method is not adapted for partially-extended sources.

\section{Choosing the best extraction method}\label{sec:opt_extended}

The best method for an unresolved source is undeniably the differential method since it removes the background emission if present, and since it removes the low-level rogue pixels. If the source is not a pure point-like source, the differential method fails and underestimates the flux.

For sources that are almost point-like source, the regular optimal extraction method (i.e., simultaneous extraction of the two nod images) provides a good alternative to the full aperture extraction, with a relatively larger signal-to-noise ratio and with a way of removing the background emission. Taking the extreme example of a source illuminating the aperture uniformly, the difference between the two nod images simply results in a image with pixel values around $0$, with a dispersion corresponding to the S/N of the observation. In such a case, the spectrum will only show noise. In the regular extraction of the same source, the PSF will be scaled to fit the flat profile as best as possible, producing a spectrum with good S/N (though the flux calibration cannot be adequately performed, resulting in a wrong absolute flux and possibly a wrong overall spectral shape).

Both methods of optimal extraction (regular and differential) are not adequate for significantly extended sources because the source spatial profile cannot be modeled with a PSF. In such cases, the full-aperture extraction is the best method. Following the recent improvements of the low-resolution pipeline (see Appendix\,\ref{app:lowres}), the best extraction method is chosen automatically between full aperture for extended sources and optimal extraction for unresolved sources (Sect.\,\ref{sec:opt_extended}). The source extent along the cross-dispersion direction is calculated by comparing the width of the source spatial profile to the FWHM of the PSF. Note that, like for low-resolution observations, we assume that the source is either unresolved or extended for the entire wavelength range. An automatic determination of a wavelength-dependent spatial extent (and the appropriate flux calibration) can only be performed in specific cases \citep{DiazSantos10,DiazSantos11}. The recommended choice of the best extraction method is accompanied in the website with an explanation and with a link to the spatial profile plot.

When the detection level is lower than a certain empirical threshold, the source is assumed to lie at the nod position and optimal extraction is chosen. The reason for this is that if the source is not detected, full aperture extraction will simply add noise while optimal extraction can provide a useful upper limit on the flux, maybe even detecting some spectral feature. For low resolution, the spatial extent determination is relatively more robust because the sources are small compared to the slit length, so the application of a PSF is more reliable. The spatial extent derived from low-resolution observations, when available, is therefore used instead of the one derived from the high-resolution observation to determine the best extraction method.

Examples of spectra extracted with full aperture and optimal extraction are shown in Figs.\,\ref{fig:spectra1}, \,\ref{fig:spectra2}, and  \,\ref{fig:spectra3}, corresponding to sources of various brightness. As can be seen from these plots, the differential optimal extraction generally provides the cleanest spectrum and best overall S/N for an unresolved source because low level rogue pixels are removed, but this extraction yields incorrect flux densities if there is any extension of the source. The regular optimal extraction (simultaneous extraction of the two nod images) also provides a significant improvement in S/N over full-aperture extraction and is valid for marginally extended sources. For extended sources, the CASSIS full-aperture extraction provides a significant improvement over the post-BCD spectrum.  It should be emphasized that optimal extraction removes the extended background and therefore yields a spectrum with overall flux values smaller than the full aperture extraction.

The choice of ``best'' extraction is dependent, therefore, on real source extent beyond the spatial profile of the PSF. Because the measure of extent is uncertain, the current version of CASSIS provides simultaneous nod extraction as the default optimal extraction for comparison to the full-aperture extraction. However, all choices are given in CASSIS so that the user can compare and select a final spectrum based on the best estimate of source extent.

\begin{figure}[h!]
\includegraphics*[angle=0,width=8cm,height=3.5cm,trim=0 1.4cm 0 0]{Figures/bright/specpbcd_cont_nod1.pdf}
\includegraphics*[angle=0,width=8cm,height=3.5cm,trim=0 1.4cm 0 0]{Figures/bright/specfull_cont_nod1_pls.pdf}
\includegraphics*[angle=0,width=8cm,height=3.5cm,trim=0 1.4cm 0 0]{Figures/bright/specopt_cont_nod1.pdf}
\includegraphics*[angle=0,width=8cm,height=3.5cm,trim=0 1.4cm 0 0]{Figures/bright/specopt_cont_diff.pdf}
\includegraphics*[angle=0,width=8cm,height=4.cm,trim=0 0 0 0]{Figures/bright/specopt_cont_nods.pdf}
\caption{SH+LH spectrum of the bright unresolved star $\xi$\,Dra (AORkey 13349632). The best spectrum is provided by the differential optimal extraction. RMS errors are shown in dark gray and systematic errors in light gray. The various colors indicate different spectral orders. The flux density scale is the same for all plots to illustrate the improvement in the RMS noise.
}
\label{fig:spectra1}
\end{figure}

\begin{figure}[h!
\includegraphics*[angle=0,width=8cm,height=3.5cm,trim=0 1.4cm 0 0]{Figures/faint/specpbcd_cont_nod1.pdf}
\includegraphics*[angle=0,width=8cm,height=3.5cm,trim=0 1.4cm 0 0]{Figures/faint/specfull_cont_nod1_pls.pdf}
\includegraphics*[angle=0,width=8cm,height=3.5cm,trim=0 1.4cm 0 0]{Figures/faint/specopt_cont_nod1.pdf}
\includegraphics*[angle=0,width=8cm,height=3.5cm,trim=0 1.4cm 0 0]{Figures/faint/specopt_cont_diff.pdf}
\includegraphics*[angle=0,width=8cm,height=4.cm,trim=0 0 0 0]{Figures/faint/specopt_cont_nods.pdf}
\caption{SH spectrum of the relatively faint post-AGB star MSX SMC029 (AORkey 25646848; \citealt{Kraemer06}). See Fig.\,\ref{fig:spectra1} for the plot description. The emission feature at $11.3${\,$\mu$m}\ and absorption features at $\approx13.5${\,$\mu$m}\ and $\approx16${\,$\mu$m}\ are real and best seen in the optimal extraction versions.
}
\label{fig:spectra2}
\end{figure}

\begin{figure}[h!
\includegraphics*[angle=0,width=8cm,height=3.5cm,trim=0 1.4cm 0 0]{Figures/random/specpbcd_cont_nod1.pdf}
\includegraphics*[angle=0,width=8cm,height=3.5cm,trim=0 1.4cm 0 00]{Figures/random/specfull_cont_nod1_pls.pdf}
\includegraphics*[angle=0,width=8cm,height=3.5cm,trim=0 1.4cm 0 0]{Figures/random/specopt_cont_nod1.pdf}
\includegraphics*[angle=0,width=8cm,height=3.5cm,trim=0 1.4cm 0 0]{Figures/random/specopt_cont_diff.pdf}
\includegraphics*[angle=0,width=8cm,height=4.cm,trim=0 0 0 0]{Figures/random/specopt_cont_nods.pdf}
\caption{LH spectrum of the faint unresolved galaxy 2MASX J10394598+6531034 (AORkey 33357568). See Fig.\,\ref{fig:spectra1} for the plot description. Note that the source has no detectable emission lines. The flux scale is the same for all plots, illustrating how optimal extraction removes the background emission that is included in full aperture extractions.  }
\label{fig:spectra3
\end{figure}

\section{Post-processing of the spectra}\label{sec:specsteps}

\subsection{Fringes removal}\label{sec:fringes}

Fringes originate between plane-parallel surfaces in the light path of the instrument. The surfaces act as Fabry-P\'erot etalons, each of which can add unique fringe components to the source signal. While the LL1 fringes are believed to be the result of a filter delamination discovered prior to launch, the SH and LH fringes originate from the detector substrates and probably also a filter in the IRS \citep{Lahuis07PhD,Lahuis03}.
Fringes are removed for any extraction type (optimal and full aperture) with the \texttt{IRSFRINGE} tool\footnote{\url{http://irsa.ipac.caltech.edu/data/SPITZER/docs/dataanalysistools/tools/irsfringe/}}. The default SH and LH settings in \texttt{IRSFRINGE} are chosen to identify fringes. Fringes are looked for in each order individually.

The flat-fielded (BCD) images already include a fringe correction, although residual fringes may remain. Such a correction relies on the assumption that the fringe phase, and to a lesser extent the amplitude, does not vary greatly between different observations. We decided to remove the fringes in the unflat-fielded images and correct for the flat-field within the flux calibration step (Sect\,\ref{sec:calib}).

\subsection{Spectral order overlaps}

The spectra from consecutive spectral orders in high-resolution observations sometimes overlap significantly. In the current version of the atlas, we do not attempt to combine the spectra in overlap regions but simply choose the order cutoffs to create a continuous spectrum with no overlaps. We have investigated a large number of sources to determine empirically the best cutoffs for each spectral order. The current values ensure that the order providing the best S/N is chosen for any particular wavelength range. Untrimmed spectra are available by request.

\subsection{Flux calibration}\label{sec:calib}

The flux calibration for optimal extraction and full aperture extraction was performed using a relative spectral response function (RSRF) calculated from $76$ observations of $\xi$\,Dra (including $20$ before campaign $25$, .i.e., before the LH detector bias voltage was set to its final value). The theoretical templates and calibration method is tied to the low-resolution spectral calibration by \cite{Sloan14} since $\xi$\,Dra was observed in both low- and high-resolution.

Separate RSRFs were created for optimal extraction (regular and differential methods) and full aperture extraction at both nod positions. This means that each extraction method has been empirically calibrated using a point source, so flux calibration is precise only for point sources. The calibration uncertainty is a systematic error that depends on wavelength.

\section{Dedicated background offset observations}\label{sec:bgsub}

Subtracting an offset background image can be a useful way to cancel out pixels with responsivity variations that cannot be calibrated reliably (low-level rogue pixels). Since the IRS high resolution modules were designed primarily to study emission lines, correctly subtracting the underlying continuum was not initially considered sufficiently important to double recommended observing times by taking a separate background spectrum.  Later in the \textit{Spitzer} mission, rogue pixels developed from cosmic ray damage by unexpectedly strong solar flares.  Only after that time were observers advised to include offset pointings for high resolution observations.  As a result, a significant fraction of observations do not have specific offsets (or in some cases the offset images were not observed with the same exposure time as the science images).

For these reasons and also because the identification of offset backgrounds \textit{a posteriori} is not straightforward, as there was no standard way of designing offset observations, we have chosen not to utilize any available background observations in the present version of the pipeline. For unresolved sources embedded in large-scale emission, both optimal extraction methods (Sect.\,\ref{sec:optext_flavors}) effectively disentangle both components. For extended sources, full-aperture extraction is the best method, and no background can be removed except a dedicated offset observation. As explained in Sect\,\ref{sec:fullap}, if the observation ID of the dedicated background observation is known, users can download the spectrum of the dedicated background observation and subtract it from the science source spectrum. The use of dedicated offset backgrounds for removal at the image level will be investigated in the future for CASSIS.

\section{Summary}

We present the high-resolution spectral pipeline for the \textit{Spitzer}/IRS instrument. The corresponding atlas is available online at \url{http://cassis.sirtf.com}, complementing the existing atlas for low-resolution data presented in L11.

High-resolution modules on the IRS are particularly plagued by cosmic ray hits and a particular attention was given to the exposure combination and image cleaning to remove as many bad pixels as possible. The pipeline produces a full-aperture extraction for extended sources. Unresolved sources are extracted with an optimal extraction using a super-sampled PSF, the latter created for the first time for the IRS high-resolution modules. Two optimal extraction methods are considered, (1) a method extracting the two nod images simultaneously and removing large-scale emission that may be instrumental or physical, (2) a method extracting the difference of the nod images, allowing a complete removal of any large-scale emission and of some instrumental artifacts.

\begin{acknowledgements}
We are grateful to F.\ Lahuis for fruitful discussions on the high-resolution optimal extraction techniques.
We wish to thank again the people who contributed to the data reduction efforts over the IRS mission. Former ISC members are especially acknowledged (in particular D.\,Devost, D.\,Levitan, D.\,Whelan, K.\,Uchida, J.D.\,Smith, E.\,Furlan, M.\,Devost, Y.\,Wu, L.\,Hao, B.\,Brandl, S.J.U.\ Higdon, P.\ Hall) for their work on the SMART software and for the development of reduction techniques. Moreover, our colleagues in Rochester (M.\,McCLure, C.\,Tayrien, I.\,Remming, D.\,Watson, and W.\,Forrest) played an important role in bringing additional and essential improvements to the data reduction used in CASSIS.
This research has made use of the NASA/IPAC Extragalactic Database (NED) which is operated by the Jet Propulsion Laboratory, California Institute of Technology, under contract with the National Aeronautics and Space Administration.
This research has made use of the SIMBAD database, operated at CDS, Strasbourg, France.
This research was conducted with support from the NASA Astrophysics and Data Analysis Program (Grant NNX13AE66G)
\end{acknowledgements}

redpajama_set_name: RedPajamaArXiv


I launched my blog Woman to Lady as a place where I could explore the topics I loved and also share what I'd learned in life with a wider audience.The site cover all types of lifestyle topics including fashion, beauty, passion, hobbies and much more, all through the lens of showing readers how to live their happiest, healthiest lives.
Over 250 Home Assemble and Crafts Jobs. Work At Home Making Crafts For Cash!
Are you looking for easy and legit way of making money from home?
How can moving house be made less of a nightmare?


text:
Q: Where can I set in Visual Studio, that the published and installed solution could acces the resource folder? (Not just in debug mode...) My project has a resource folder that contains pictures and xml files. The program can access the files just in debug mode. When I installed the solution, and run the program it doesn't work. How can I publish my Win Forms solution that it could access the resource folder after install?
Here is my VB code that can pretty good access the files in runtime:
myPath = "myResources\" & fileName & ".xml"

A: The correct path is this: myXmlPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "MyXmlFolder", myFileName & ".xml") The correct properties for the files:
-Build action: Content
-Copy to Output Directory: Copy if newer

redpajama_set_name: RedPajamaStackExchange


text:
Remember The River
Laughing Outlaw Records
Halfway and I got off to a bad start really. Hearing the buzz, with promises of stepping inside a house with pictures of The Jayhawks, Uncle Tupelo and Neil Young on the walls, I think I expected too much. I expected something else. It wasn't what I got. You know, the dangers of labels. Like being told that you're gonna get served paella but it's Chilli Con Carne there in the bowl. Oh, well, Spanish name, but not quite from Spain and it's not fish. It's very good though. See what I mean?
Halfway manages to hit that point right between so many spots, sounding as if they could come out of anywhere (they're from Brisbane, Australia) and playing music with a fuzzy family-tree (they call it country music). I mean that in the best possible way. They're what, to me, resemble a good band; songs that don't nail them to a genre, voices from different singers that don't spread all over the plate, making it sound like it's a compilation-disc - and it's obvious that they like what they're doing. They don't come out too ambitious but still with an obvious wish to reach further. And I truly hope they do. They've got that loose swing of things but still tight enough for dance. And truly enough to keep me interested the tenth time around the record.
I've already recommended the record to friends with a thing for Richmond Fontaine and Drive-By-Truckers. Ok, it's the same people with a huge thing for Whiskeytown and Uncle Tupelo, but those references wouldn't work for Halfway.
Highlights such as "Dearest Mother", "Factory Floor", "Left For Luck" and "Edge of the Peer" are so good that weaker ones, like "Big Wave", don't count much for complaints. Another Aussie output that puts shame to the unfairness of "down under", unless you put all the best in "underdog".
Copyright © 2006 Anders Svendsen
You may also want to check out our Halfway articles/reviews: An Outpost of Promise, Farewell to the Fainthearted.
Baroness: Yellow & Green (2xLP Deluxe Book Edition 2012)
Cranium Pie: Mechanisms Pt.1 (LP 2011 LTD 100)
In Gowan Ring: Full Flower Moon (10" 2014 LTD 99)
Jeremy Irons & The Ratgang Malibus: Bloom (LP 2012)
Mick Stevens: See The Morning/No Savage Word (2xLP 1972-75/Re 2002 LTD 350)
Psychic TV: Dreams Less Sweet (LP+CD 1983/Re 2012 LTD 320)
Sonne Hagal: Only Echoes Remain (2xLP 2010 LTD 100)
My Majestic Star: 'and having a reason why'
My Majestic Star: Crampling
My Majestic Star: Ideas are the Answer
My Majestic Star: Too Late, The Day

redpajama_set_name: RedPajamaCommonCrawl